Interface Horde_View_Interface
Horde_View_Interface is a reference for classes to be used as Horde
Views. Implementing it is optional; type hinting is not used to
enforce the interface.
Methods summary
public
null
|
#
__get( mixed $name )
Undefined variables return null.
Undefined variables return null.
Returns
null
|
public
string
|
#
__call( string $name, array $args )
Accesses a helper object from within a template.
Accesses a helper object from within a template.
Parameters
- $name
- $method The helper method.
- $args
- The parameters for the helper.
Returns
string The result of the helper method.
|
public
|
#
addTemplatePath( string|array $path )
Adds to the stack of template paths in LIFO order.
Adds to the stack of template paths in LIFO order.
Parameters
- $path
- directory (-ies) to add.
|
public
|
#
setTemplatePath( string|array $path )
Resets the stack of template paths.
Resets the stack of template paths.
To clear all paths, use Horde_View::setTemplatePath(null).
Parameters
- $path
- directory (-ies) to set as the path.
|
public
Horde_View_Helper
|
#
addHelper( Horde_View_Helper|string $helper )
Adds to the stack of helpers in LIFO order.
Adds to the stack of helpers in LIFO order.
Parameters
- $helper
- The helper instance to add.
Returns
Horde_View_Helper Returns the helper object that was added.
|
public
|
#
assign( array $array )
Assigns multiple variables to the view.
Assigns multiple variables to the view.
The array keys are used as names, each assigned their corresponding
array value.
Parameters
- $array
- The array of key/value pairs to assign.
|
public
string
|
#
render( string $name )
Processes a template and returns the output.
Processes a template and returns the output.
Parameters
- $name
- The template to process.
Returns
string The template output.
|
public
|
#
setEncoding( string $encoding )
Sets the output encoding.
Sets the output encoding.
Parameters
- $encoding
- A character set name.
|
public
string
|
#
getEncoding( )
Returns the current output encoding.
Returns the current output encoding.
Returns
string The current character set.
|