Cts_View_Renderer

Summary
Cts_View_Renderer
AuthorJaybill McCarthy
Licensehttp://communit.as/docs/license
See AlsoZend_View_Interface
Variables
$_smartySmarty object.
Constructors
__construct
Instance Methods
getEngineReturn the template engine object.
getScriptPathsRetrieve the current template directory.
setBasePathAlias for setScriptPath.
addBasePathAlias for setScriptPath.
__setAssign a variable to the template.
__getRetrieve an assigned variable.
__issetAllows testing with empty() and isset() to work.
__unsetAllows unset() on object properties to work.
assignAssign variables to the template.
clearVarsClears all variables assigned to Zend_View either via {@link assign()} or property overloading ({@link __get()}/{@link __set()}).
renderProcesses a template and returns the output.
displayDisplay the template.

Author

Jaybill McCarthy

See Also

Zend_View_Interface

Variables

$_smarty

public $_smarty

Smarty object.

Constructors

__construct

public function __construct($tmplPath =  null,
$extraParams =  array())

Arguments

tmplPathTBD
extraParamsTBD

Instance Methods

getEngine

public function getEngine()

Return the template engine object.

Arguments

none

Returns

The current Smarty template engine object.

getScriptPaths

public function getScriptPaths()

Retrieve the current template directory.

Arguments

none

Returns

array

setBasePath

public function setBasePath($path,  
$prefix =  'Zend_View')

Alias for setScriptPath.

Arguments

pathTBD
prefix (optional)TBD - Default is ‘Zend_View’.

Returns

void

addBasePath

public function addBasePath($path,  
$prefix =  'Zend_View')

Alias for setScriptPath.

Arguments

path

Returns

void

__set

public function __set($key,
$val)

Assign a variable to the template.

Arguments

keyThe variable name.
valThe variable value.

Returns

void

__get

public function __get($key)

Retrieve an assigned variable.

Arguments

keyThe variable name.

Returns

The variable value.

__isset

public function __isset($key)

Allows testing with empty() and isset() to work.

Arguments

keyThe variable name.

Returns

boolean

__unset

public function __unset($key)

Allows unset() on object properties to work.

Arguments

keyThe variable name.

Returns

void

assign

public function assign($spec,  
$value =  null)

Assign variables to the template.  Allows setting a specific key to the specified value, OR passing an array of key => value pairs to set en masse.

Arguments

specThe assignment strategy to use (key or array of key => value pairs)
value (optional)If assigning a named variable, use this as the value.

Returns

void

clearVars

public function clearVars()

Clears all variables assigned to Zend_View either via {@link assign()} or property overloading ({@link __get()}/{@link __set()}).

Arguments

none

Returns

void

render

public function render($name)

Processes a template and returns the output.

Arguments

nameThe template to process.

Returns

string

display

public function display($name)

Display the template.

Arguments

nameThe path and filename of template to process.

Returns

void

public $_smarty
Smarty object.
public function __construct($tmplPath =  null,
$extraParams =  array())
public function getEngine()
Return the template engine object.
public function getScriptPaths()
Retrieve the current template directory.
public function setBasePath($path,  
$prefix =  'Zend_View')
Alias for setScriptPath.
public function addBasePath($path,  
$prefix =  'Zend_View')
Alias for setScriptPath.
public function __set($key,
$val)
Assign a variable to the template.
public function __get($key)
Retrieve an assigned variable.
public function __isset($key)
Allows testing with empty() and isset() to work.
public function __unset($key)
Allows unset() on object properties to work.
public function assign($spec,  
$value =  null)
Assign variables to the template.
public function clearVars()
Clears all variables assigned to Zend_View either via {@link assign()} or property overloading ({@link __get()}/{@link __set()}).
public function render($name)
Processes a template and returns the output.
public function display($name)
Display the template.
Close