Helper for declaring default values of template variables
package | Zend_View |
---|---|
subpackage | Helper |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_View_Helper_Abstract |
declareVars() : void
Primarily for use when using Zend_View strictVars(), this helper can be used to declare template variables that may or may not already be set in the view object, as well as to set default values. Arrays passed as arguments to the method will be used to set default values; otherwise, if the variable does not exist, it is set to an empty string.
Usage:
$this->declareVars(
'varName1',
'varName2',
array('varName3' => 'defaultValue',
'varName4' => array()
)
);
direct() : void
inherited_from | \Zend_View_Helper_Interface::direct() |
---|
setView(\Zend_View_Interface $view) : \Zend_View_Helper_Abstract
inherited_from | \Zend_View_Helper_Interface::setView() |
---|
\Zend_View_Interface
\Zend_View_Helper_Abstract
_declareVar(string $key, string $value = ''
) : void
Checks to see if a $key is set in the view object; if not, sets it to $value.
string
string
Defaults to an empty string
$view : \Zend_View
inherited_from | \Zend_View_Helper_Abstract::view |
---|
$view : \Zend_View_Interface
null