Public Member Functions | |
__construct ($config=array()) | |
getEngine () | |
init () | |
__get ($key) | |
__isset ($key) | |
__set ($key, $val) | |
__unset ($key) | |
__call ($name, $args) | |
setBasePath ($path, $classPrefix= 'Zend_View') | |
addBasePath ($path, $classPrefix= 'Zend_View') | |
addScriptPath ($path) | |
setScriptPath ($path) | |
getScriptPath ($name) | |
getScriptPaths () | |
setPluginLoader (Zend_Loader_PluginLoader $loader, $type) | |
getPluginLoader ($type) | |
addHelperPath ($path, $classPrefix= 'Zend_View_Helper_') | |
setHelperPath ($path, $classPrefix= 'Zend_View_Helper_') | |
getHelperPath ($name) | |
getHelperPaths () | |
getHelper ($name) | |
getHelpers () | |
addFilterPath ($path, $classPrefix= 'Zend_View_Filter_') | |
setFilterPath ($path, $classPrefix= 'Zend_View_Filter_') | |
getFilterPath ($name) | |
getFilter ($name) | |
getFilters () | |
getFilterPaths () | |
getAllPaths () | |
addFilter ($name) | |
setFilter ($name) | |
setEscape ($spec) | |
setLfiProtection ($flag) | |
isLfiProtectionOn () | |
assign ($spec, $value=null) | |
getVars () | |
clearVars () | |
render ($name) | |
escape ($var) | |
setEncoding ($encoding) | |
getEncoding () | |
strictVars ($flag=true) | |
Protected Member Functions | |
_script ($name) | |
_run () |
Definition at line 39 of file Abstract.php.
__construct | ( | $ | config = array() ) |
Constructor.
array | $config | Configuration key-value pairs. |
Reimplemented in Zend_View.
Definition at line 147 of file Abstract.php.
__call | ( | $ | name, |
$ | args | ||
) |
Accesses a helper object from within a script.
If the helper class has a 'view' property, sets it with the current view object.
string | $name | The helper name. |
array | $args | The parameters for the helper. |
Definition at line 331 of file Abstract.php.
__get | ( | $ | key ) |
Prevent E_NOTICE for nonexistent values
If strictVars() is on, raises a notice.
string | $key |
Definition at line 259 of file Abstract.php.
__isset | ( | $ | key ) |
Allows testing with empty() and isset() to work inside templates.
string | $key |
Implements Zend_View_Interface.
Definition at line 275 of file Abstract.php.
__set | ( | $ | key, |
$ | val | ||
) |
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.
string | $key | The variable name. |
mixed | $val | The variable value. |
Zend_View_Exception | if an attempt to set a private or protected member is detected |
Implements Zend_View_Interface.
Definition at line 297 of file Abstract.php.
__unset | ( | $ | key ) |
Allows unset() on object properties to work
string | $key |
Implements Zend_View_Interface.
Definition at line 314 of file Abstract.php.
_run | ( | ) | [abstract, protected] |
Use to include the view script in a scope that only allows public members.
Reimplemented in Zend_View.
_script | ( | $ | name ) | [protected] |
Finds a view script from the available directories.
$name | string The base name of the script. |
Definition at line 901 of file Abstract.php.
addBasePath | ( | $ | path, |
$ | classPrefix = 'Zend_View' |
||
) |
Given a base path, add script, helper, and filter paths relative to it
Assumes a directory structure of: basePath/ scripts/ helpers/ filters/
string | $path | |
string | $prefix | Prefix to use for helper and filter paths |
Implements Zend_View_Interface.
Definition at line 385 of file Abstract.php.
addFilter | ( | $ | name ) |
Add one or more filters to the stack in FIFO order.
string|array | One or more filters to add. |
Definition at line 674 of file Abstract.php.
addFilterPath | ( | $ | path, |
$ | classPrefix = 'Zend_View_Filter_' |
||
) |
Adds to the stack of filter paths in LIFO order.
string|array | The directory (-ies) to add. | |
string | $classPrefix | Class prefix to use with classes in this directory; defaults to Zend_View_Filter |
Definition at line 590 of file Abstract.php.
addHelperPath | ( | $ | path, |
$ | classPrefix = 'Zend_View_Helper_' |
||
) |
Adds to the stack of helper paths in LIFO order.
string|array | The directory (-ies) to add. | |
string | $classPrefix | Class prefix to use with classes in this directory; defaults to Zend_View_Helper |
Definition at line 517 of file Abstract.php.
addScriptPath | ( | $ | path ) |
Adds to the stack of view script paths in LIFO order.
string|array | The directory (-ies) to add. |
Definition at line 403 of file Abstract.php.
assign | ( | $ | spec, |
$ | value = null |
||
) |
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).
string|array | The assignment strategy to use. |
mixed | (Optional) If assigning a named variable, use this as the value. |
Zend_View_Exception | if $spec is neither a string nor an array, or if an attempt to set a private or protected member is detected |
Implements Zend_View_Interface.
Definition at line 748 of file Abstract.php.
clearVars | ( | ) |
Clear all assigned variables
Clears all variables assigned to Zend_View either via assign() or property overloading (__set()).
Implements Zend_View_Interface.
Definition at line 808 of file Abstract.php.
escape | ( | $ | var ) |
Escapes a value for output in a view script.
If escaping mechanism is one of htmlspecialchars or htmlentities, uses $_encoding setting.
mixed | $var | The output to escape. |
Definition at line 845 of file Abstract.php.
getAllPaths | ( | ) |
Return associative array of path types => paths
Definition at line 660 of file Abstract.php.
getEncoding | ( | ) |
getEngine | ( | ) |
Return the template engine object
Returns the object instance, as it is its own template engine
Implements Zend_View_Interface.
Definition at line 234 of file Abstract.php.
getFilter | ( | $ | name ) |
Get a filter object by name
string | $name |
Definition at line 628 of file Abstract.php.
getFilterPath | ( | $ | name ) |
Get full path to a filter class file specified by $name
string | $name |
Definition at line 617 of file Abstract.php.
getFilterPaths | ( | ) |
Returns an array of all currently set filter paths
Definition at line 650 of file Abstract.php.
getFilters | ( | ) |
Return array of all currently active filters
Only returns those that have already been instantiated.
Definition at line 640 of file Abstract.php.
getHelper | ( | $ | name ) |
Get a helper by name
string | $name |
Definition at line 565 of file Abstract.php.
getHelperPath | ( | $ | name ) |
Get full path to a helper class file specified by $name
string | $name |
Definition at line 544 of file Abstract.php.
getHelperPaths | ( | ) |
Returns an array of all currently set helper paths
Definition at line 554 of file Abstract.php.
getHelpers | ( | ) |
Get array of all active helpers
Only returns those that have already been instantiated.
Definition at line 577 of file Abstract.php.
getPluginLoader | ( | $ | type ) |
Retrieve plugin loader for a specific plugin type
string | $type |
Definition at line 480 of file Abstract.php.
getScriptPath | ( | $ | name ) |
Return full path to a view script specified by $name
string | $name |
Zend_View_Exception | if no script directory set |
Definition at line 431 of file Abstract.php.
getScriptPaths | ( | ) |
Returns an array of all currently set script paths
Implements Zend_View_Interface.
Definition at line 450 of file Abstract.php.
getVars | ( | ) |
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.
Definition at line 788 of file Abstract.php.
init | ( | ) |
Allow custom object initialization when extending Zend_View_Abstract or Zend_View
Triggered by the constructor as its final action.
Definition at line 247 of file Abstract.php.
isLfiProtectionOn | ( | ) |
render | ( | $ | name ) |
Processes a view script and returns the output.
string | $name | The script script name to process. |
Implements Zend_View_Interface.
Definition at line 824 of file Abstract.php.
setBasePath | ( | $ | path, |
$ | classPrefix = 'Zend_View' |
||
) |
Given a base path, sets the script, helper, and filter paths relative to it
Assumes a directory structure of: basePath/ scripts/ helpers/ filters/
string | $path | |
string | $prefix | Prefix to use for helper and filter paths |
Implements Zend_View_Interface.
Definition at line 358 of file Abstract.php.
setEncoding | ( | $ | encoding ) |
Set encoding to use with htmlentities() and htmlspecialchars()
string | $encoding |
Definition at line 860 of file Abstract.php.
setEscape | ( | $ | spec ) |
Sets the _escape() callback.
mixed | $spec | The callback for _escape() to use. |
Definition at line 703 of file Abstract.php.
setFilter | ( | $ | name ) |
Resets the filter stack.
To clear all filters, use Zend_View::setFilter(null).
string|array | One or more filters to set. |
Definition at line 690 of file Abstract.php.
setFilterPath | ( | $ | path, |
$ | classPrefix = 'Zend_View_Filter_' |
||
) |
Resets the stack of filter paths.
To clear all paths, use Zend_View::setFilterPath(null).
string|array | The directory (-ies) to set as the path. | |
string | $classPrefix | The class prefix to apply to all elements in $path; defaults to Zend_View_Filter |
Definition at line 605 of file Abstract.php.
setHelperPath | ( | $ | path, |
$ | classPrefix = 'Zend_View_Helper_' |
||
) |
Resets the stack of helper paths.
To clear all paths, use Zend_View::setHelperPath(null).
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 |
Definition at line 532 of file Abstract.php.
setLfiProtection | ( | $ | flag ) |
Set LFI protection flag
bool | $flag |
Definition at line 715 of file Abstract.php.
setPluginLoader | ( | Zend_Loader_PluginLoader $ | loader, |
$ | type | ||
) |
Set plugin loader for a particular plugin type
Zend_Loader_PluginLoader | $loader | |
string | $type |
Definition at line 462 of file Abstract.php.
setScriptPath | ( | $ | path ) |
Resets the stack of view script paths.
To clear all paths, use Zend_View::setScriptPath(null).
string|array | The directory (-ies) to set as the path. |
Implements Zend_View_Interface.
Definition at line 417 of file Abstract.php.
strictVars | ( | $ | flag = true ) |
Enable or disable strict vars
If strict variables are enabled, __get() will raise a notice when a variable is not defined.
Use in conjunction with the declareVars() helper to enforce strict variable handling in your view scripts.
boolean | $flag |
Definition at line 888 of file Abstract.php.