API Documentation

View/Interface.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_View  
version
$Id: Interface.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_View_Interface

Interface class for Zend_View compatible template engine implementations

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

Methods

methodpublic__isset( string $key ) : boolean

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

Parameters
Name Type Description
$key string
Returns
Type Description
boolean
methodpublic__set( string $key, mixed $val ) : void

Assign a variable to the view

Parameters
Name Type Description
$key string The variable name.
$val mixed The variable value.
methodpublic__unset( string $key ) : void

Allows unset() on object properties to work

Parameters
Name Type Description
$key string
methodpublicaddBasePath( string $path, string $classPrefix = Zend_View ) : void

Add an additional path to view resources

Parameters
Name Type Description
$path string
$classPrefix string
methodpublicassign( string|array $spec, mixed $value = null ) : void

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.

Parameters
Name Type Description
$spec string|array

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.

Details
see
\__set()  
methodpublicclearVars( ) : void

Clear all assigned variables

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

methodpublicgetEngine( ) : mixed

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
Type Description
mixed
methodpublicgetScriptPaths( ) : array

Retrieve all view script paths

Returns
Type Description
array
methodpublicrender( string $name ) : string

Processes a view script and returns the output.

Parameters
Name Type Description
$name string The script name to process.
Returns
Type Description
string The script output.
methodpublicsetBasePath( string $path, string $classPrefix = Zend_View ) : void

Set a base path to all view resources

Parameters
Name Type Description
$path string
$classPrefix string
methodpublicsetScriptPath( string|array $path ) : void

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

Parameters
Name Type Description
$path string|array

The directory (-ies) to set as the path. Note that the concrete view implentation may not necessarily support multiple directories.

Documentation was generated by DocBlox 0.13.3.