\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.

Summary

Methods
Constants
__get()
__call()
addTemplatePath()
setTemplatePath()
addHelper()
assign()
render()
setEncoding()
getEncoding()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

__get()

__get(  $name) : null

Undefined variables return null.

Parameters

$name

Returns

null

__call()

__call(  $name, array  $args) : string

Accesses a helper object from within a template.

Parameters

$name
array $args

The parameters for the helper.

Returns

string —

The result of the helper method.

addTemplatePath()

addTemplatePath(  $path) 

Adds to the stack of template paths in LIFO order.

Parameters

$path

setTemplatePath()

setTemplatePath(  $path) 

Resets the stack of template paths.

To clear all paths, use Horde_View::setTemplatePath(null).

Parameters

$path

addHelper()

addHelper(\Horde_View_Helper|string  $helper) : \Horde_View_Helper

Adds to the stack of helpers in LIFO order.

Parameters

\Horde_View_Helper|string $helper

The helper instance to add.

Returns

\Horde_View_Helper —

Returns the helper object that was added.

assign()

assign(array  $array) 

Assigns multiple variables to the view.

The array keys are used as names, each assigned their corresponding array value.

Parameters

array $array

The array of key/value pairs to assign.

render()

render(string  $name) : string

Processes a template and returns the output.

Parameters

string $name

The template to process.

Returns

string —

The template output.

setEncoding()

setEncoding(string  $encoding) 

Sets the output encoding.

Parameters

string $encoding

A character set name.

getEncoding()

getEncoding() : string

Returns the current output encoding.

Returns

string —

The current character set.