Zend Framework  1.12
Public Member Functions | List of all members
Zend_View_Interface Interface Reference

Public Member Functions

 getEngine ()
 Return the template engine object, if any.
 
 setScriptPath ($path)
 Set the path to find the view script used by render()
 
 getScriptPaths ()
 Retrieve all view script paths.
 
 setBasePath ($path, $classPrefix= 'Zend_View')
 Set a base path to all view resources.
 
 addBasePath ($path, $classPrefix= 'Zend_View')
 Add an additional path to view resources.
 
 __set ($key, $val)
 Assign a variable to the view.
 
 __isset ($key)
 Allows testing with empty() and isset() to work.
 
 __unset ($key)
 Allows unset() on object properties to work.
 
 assign ($spec, $value=null)
 Assign variables to the view script via differing strategies.
 
 clearVars ()
 Clear all assigned variables.
 
 render ($name)
 Processes a view script and returns the output.
 

Member Function Documentation

__isset (   $key)

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

Parameters
string$key
Returns
boolean

Implemented in Zend_View_Abstract.

__set (   $key,
  $val 
)

Assign a variable to the view.

Parameters
string$keyThe variable name.
mixed$valThe variable value.
Returns
void

Implemented in Zend_View_Abstract.

__unset (   $key)

Allows unset() on object properties to work.

Parameters
string$key
Returns
void

Implemented in Zend_View_Abstract.

addBasePath (   $path,
  $classPrefix = 'Zend_View' 
)

Add an additional path to view resources.

Parameters
string$path
string$classPrefix
Returns
void

Implemented in Zend_View_Abstract.

assign (   $spec,
  $value = null 
)

Assign variables to the view script via differing strategies.

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 Also
__set()
Parameters
string | array$specThe assignment strategy to use (key or array of key => value pairs)
mixed$value(Optional) If assigning a named variable, use this as the value.
Returns
void

Implemented in Zend_View_Abstract.

clearVars ( )

Clear all assigned variables.

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

Returns
void

Implemented in Zend_View_Abstract.

getEngine ( )

Return the template engine object, if any.

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

Implemented in Zend_View_Abstract.

getScriptPaths ( )

Retrieve all view script paths.

Returns
array

Implemented in Zend_View_Abstract.

render (   $name)

Processes a view script and returns the output.

Parameters
string$nameThe script name to process.
Returns
string The script output.

Implemented in Zend_View_Abstract.

setBasePath (   $path,
  $classPrefix = 'Zend_View' 
)

Set a base path to all view resources.

Parameters
string$path
string$classPrefix
Returns
void

Implemented in Zend_View_Abstract.

setScriptPath (   $path)

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

Parameters
string|arrayThe directory (-ies) to set as the path. Note that the concrete view implentation may not necessarily support multiple directories.
Returns
void

Implemented in Zend_View_Abstract.