Interface class for Zend_View compatible template engine implementations

category Zend
package Zend_View
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

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

__isset(string $key) : boolean

Parameters

$key

string

Returns

boolean

Assign a variable to the view

__set(string $key, mixed $val) : void

Parameters

$key

string

The variable name.

$val

mixed

The variable value.

Allows unset() on object properties to work

__unset(string $key) : void

Parameters

$key

string

Add an additional path to view resources

addBasePath(string $path, string $classPrefix = 'Zend_View') : void

Parameters

$path

string

$classPrefix

string

Assign variables to the view script via differing strategies.

assign(string|array $spec, mixed $value = null) : void

Suggested implementation is to allow setting a specific key to the specified value, OR passing an array of key => value pairs to set en masse.

see

Parameters

$spec

stringarray

The assignment strategy to use (key or array of key => value pairs)

$value

mixed

(Optional) If assigning a named variable, use this as the value.

Clear all assigned variables

clearVars() : void

Clears all variables assigned to Zend_View either via \assign() or property overloading (__get()/__set()).

Return the template engine object, if any

getEngine() : mixed

If using a third-party template engine, such as Smarty, patTemplate, phplib, etc, return the template engine object. Useful for calling methods on these objects, such as for setting filters, modifiers, etc.

Returns

mixed

Retrieve all view script paths

getScriptPaths() : array

Returns

array

Processes a view script and returns the output.

render(string $name) : string

Parameters

$name

string

The script name to process.

Returns

stringThe script output.

Set a base path to all view resources

setBasePath(string $path, string $classPrefix = 'Zend_View') : void

Parameters

$path

string

$classPrefix

string

Set the path to find the view script used by render()

setScriptPath($path) : void

Parameters

$path