Documentation

Horde_View_Interface
in

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.

Tags
category

Horde

Table of Contents

__call()  : string
Accesses a helper object from within a template.
__get()  : null
Undefined variables return null.
addHelper()  : Horde_View_Helper
Adds to the stack of helpers in LIFO order.
addTemplatePath()  : mixed
Adds to the stack of template paths in LIFO order.
assign()  : mixed
Assigns multiple variables to the view.
getEncoding()  : string
Returns the current output encoding.
render()  : string
Processes a template and returns the output.
setEncoding()  : mixed
Sets the output encoding.
setTemplatePath()  : mixed
Resets the stack of template paths.

Methods

__call()

Accesses a helper object from within a template.

public __call(mixed $name, array<string|int, mixed> $args) : string
Parameters
$name : mixed
$args : array<string|int, mixed>

The parameters for the helper.

Return values
string

The result of the helper method.

__get()

Undefined variables return null.

public __get(mixed $name) : null
Parameters
$name : mixed
Return values
null

addHelper()

Adds to the stack of helpers in LIFO order.

public addHelper(Horde_View_Helper|string $helper) : Horde_View_Helper
Parameters
$helper : Horde_View_Helper|string

The helper instance to add.

Return values
Horde_View_Helper

Returns the helper object that was added.

addTemplatePath()

Adds to the stack of template paths in LIFO order.

public addTemplatePath(mixed $path) : mixed
Parameters
$path : mixed
Return values
mixed

assign()

Assigns multiple variables to the view.

public assign(array<string|int, mixed> $array) : mixed

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

Parameters
$array : array<string|int, mixed>

The array of key/value pairs to assign.

Return values
mixed

getEncoding()

Returns the current output encoding.

public getEncoding() : string
Return values
string

The current character set.

render()

Processes a template and returns the output.

public render(string $name) : string
Parameters
$name : string

The template to process.

Return values
string

The template output.

setEncoding()

Sets the output encoding.

public setEncoding(string $encoding) : mixed
Parameters
$encoding : string

A character set name.

Return values
mixed

setTemplatePath()

Resets the stack of template paths.

public setTemplatePath(mixed $path) : mixed

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

Parameters
$path : mixed
Return values
mixed

Search results