Constructor.
Zend_View_Abstract
__construct
([array $config = array()])
-
array
$config: Configuration key-value pairs.
Add one or more filters to the stack in FIFO order.
void
addFilter
(string|array $name)
-
string|array
$name: One or more filters to add.
Adds to the stack of filter paths in LIFO order.
void
addFilterPath
(string|array $path, [string $classPrefix = 'Zend_View_Filter_'])
-
string
$classPrefix: Class prefix to use with classes in this directory; defaults to Zend_View_Filter
-
string|array
$path: The directory (-ies) to add.
Adds to the stack of helper paths in LIFO order.
void
addHelperPath
(string|array $path, [string $classPrefix = 'Zend_View_Helper_'])
-
string
$classPrefix: Class prefix to use with classes in this directory; defaults to Zend_View_Helper
-
string|array
$path: The directory (-ies) to add.
Adds to the stack of view script paths in LIFO order.
void
addScriptPath
(string|array $path)
-
string|array
$path: The directory (-ies) to add.
Assigns variables to the view script via differing strategies.
Zend_View::assign('name', $value) assigns a variable called 'name' with the corresponding $value.
Zend_View::assign($array) assigns the array keys as variable names (with the corresponding array values).
void
assign
(string|array $spec, [mixed $value = null])
-
string|array
$spec: The assignment strategy to use.
-
mixed
$value: (Optional) If assigning a named variable, use this as the value.
Implementation of:
- Zend_View_Interface::assign()
- Assign variables to the view script via differing strategies.
Escapes a value for output in a view script.
If escaping mechanism is one of htmlspecialchars or htmlentities, uses $_encoding setting.
mixed
escape
(mixed $var)
-
mixed
$var: The output to escape.
Return associative array of path types => paths
array
getAllPaths
()
Return current escape encoding
string
getEncoding
()
Return the template engine object
Returns the object instance, as it is its own template engine
Implementation of:
- Zend_View_Interface::getEngine()
- Return the template engine object, if any
Returns an array of all currently set filter paths
array
getFilterPaths
()
Returns an array of all currently set helper paths
array
getHelperPaths
()
Returns an array of all currently set script paths
array
getScriptPaths
()
Return list of all assigned variables
Returns all public properties of the object. Reflection is not used here as testing reflection properties for visibility is buggy.
array
getVars
()
Processes a view script and returns the output.
string
render
(string $name)
-
string
$name: The script script name to process.
Implementation of:
- Zend_View_Interface::render()
- Processes a view script and returns the output.
Set encoding to use with htmlentities() and htmlspecialchars()
void
setEncoding
(string $encoding)
Sets the _escape() callback.
void
setEscape
(mixed $spec)
-
mixed
$spec: The callback for _escape() to use.
Resets the filter stack.
To clear all filters, use Zend_View::setFilter(null).
void
setFilter
(string|array $name)
-
string|array
$name: One or more filters to set.
Resets the stack of filter paths.
To clear all paths, use Zend_View::setFilterPath(null).
void
setFilterPath
(string|array $path, [string $classPrefix = 'Zend_View_Filter_'])
-
string
$classPrefix: The class prefix to apply to all elements in $path; defaults to Zend_View_Filter
-
string|array
$path: The directory (-ies) to set as the path.
Resets the stack of helper paths.
To clear all paths, use Zend_View::setHelperPath(null).
void
setHelperPath
(string|array $path, [string $classPrefix = 'Zend_View_Helper_'])
-
string|array
$path: The directory (-ies) to set as the path.
-
string
$classPrefix: The class prefix to apply to all elements in $path; defaults to Zend_View_Helper
Resets the stack of view script paths.
To clear all paths, use Zend_View::setScriptPath(null).
void
setScriptPath
(string|array $path)
-
string|array
$path: The directory (-ies) to set as the path.
Implementation of:
- Zend_View_Interface::setScriptPath()
- Set the path to find the view script used by render()
Use to include the view script in a scope that only allows public members.
mixed
_run
()
Redefined in descendants as:
-
Zend_View::_run()
: Includes the view script in a scope with only public $this variables.
Finds a view script from the available directories.
void
_script
($name $name)
-
$name
$name: string The base name of the script.
Accesses a helper object from within a script.
string
__call
(string $name, array $args)
-
string
$name: The helper name.
-
array
$args: The parameters for the helper.
Allows testing with empty() and isset() to work inside templates.
boolean
__isset
(string $key)
Implementation of:
- Zend_View_Interface::__isset()
- Allows testing with empty() and isset() to work
Directly assigns a variable to the view script.
Checks first to ensure that the caller is not attempting to set a protected or private member (by checking for a prefixed underscore); if not, the public member is set; otherwise, an exception is raised.
void
__set
(string $key, mixed $val)
-
string
$key: The variable name.
-
mixed
$val: The variable value.
Implementation of:
- Zend_View_Interface::__set()
- Assign a variable to the view
Allows unset() on object properties to work
void
__unset
(string $key)
Implementation of:
- Zend_View_Interface::__unset()
- Allows unset() on object properties to work