API Documentation

View/Interface.php

Interfaces
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_View
version
$Id: Interface.php 20210 2010-01-12 02:06:34Z yoshida@zend.co.jp $
Interfaces
Zend_View_Interface

Description

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.

Zend_View_Interface

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_View
Methods
getEngine
setScriptPath
getScriptPaths
setBasePath
addBasePath
__set
__isset
__unset
assign
clearVars
render

Description

Interface class for Zend_View compatible template engine implementations

Methods

__isset

__isset( string $key ) : boolean

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

Arguments
$key
string
Output
boolean
Details
visibility
public
final
false
static
false

__set

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

Assign a variable to the view

Arguments
$key
string
The variable name.
$val
mixed
The variable value.
Details
visibility
public
final
false
static
false

__unset

__unset( string $key ) : void

Allows unset() on object properties to work

Arguments
$key
string
Details
visibility
public
final
false
static
false

addBasePath

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

Add an additional path to view resources

Arguments
$path
string
$classPrefix
string
Details
visibility
public
final
false
static
false

assign

assign( 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.

Arguments
$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.
Details
visibility
public
final
false
static
false
see
__set()

clearVars

clearVars( ) : void

Clear all assigned variables

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

Details
visibility
public
final
false
static
false

getEngine

getEngine( ) : 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.

Output
mixed
Details
visibility
public
final
false
static
false

getScriptPaths

getScriptPaths( ) : array

Retrieve all view script paths

Output
array
Details
visibility
public
final
false
static
false

render

render( string $name ) : string

Processes a view script and returns the output.

Arguments
$name
string
The script name to process.
Output
string
The script output.
Details
visibility
public
final
false
static
false

setBasePath

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

Set a base path to all view resources

Arguments
$path
string
$classPrefix
string
Details
visibility
public
final
false
static
false

setScriptPath

setScriptPath( string|array $path ) : void

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

Arguments
$path
stringarray
The directory (-ies) to set as the path. Note that the concrete view implentation may not necessarily support multiple directories.
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.