Concrete class for handling view scripts.
Methods
Accesses a helper object from within a script.
__call(string $name, array $args) : string
Inherited
If the helper class has a 'view' property, sets it with the current view
object.
Parameters
$name
string
The helper name.
$args
array
The parameters for the helper.
Returns
string
The result of the helper output.
Constructor
__construct(array $config = array()
) : void
Register Zend_View_Stream stream wrapper if short tags are disabled.
inherited_from |
\Zend_View_Abstract::__construct() |
Parameters
$config
array
Constructor.
__construct(array $config = array()
)
Inherited
Parameters
$config
array
Configuration key-value pairs.
Prevent E_NOTICE for nonexistent values
__get(string $key) : null
Inherited
If \strictVars() is on, raises a notice.
Parameters
$key
string
Returns
null
Allows testing with empty() and isset() to work inside
templates.
__isset(string $key) : boolean
Inherited
inherited_from |
\Zend_View_Interface::__isset() |
Parameters
$key
string
Returns
boolean
Directly assigns a variable to the view script.
__set(string $key, mixed $val) : void
Inherited
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.
inherited_from |
\Zend_View_Interface::__set() |
Parameters
$key
string
The variable name.
$val
mixed
The variable value.
Exceptions
\Zend_View_Exception |
if an attempt to set a private or protected
member is detected |
Allows unset() on object properties to work
__unset(string $key) : void
Inherited
inherited_from |
\Zend_View_Interface::__unset() |
Parameters
$key
string
Given a base path, add script, helper, and filter paths relative to it
addBasePath(string $path, string $classPrefix = 'Zend_View'
) : \Zend_View_Abstract
Inherited
Assumes a directory structure of:
basePath/
scripts/
helpers/
filters/
inherited_from |
\Zend_View_Interface::addBasePath() |
Parameters
$path
string
$classPrefix
Returns
\Zend_View_Abstract
Add one or more filters to the stack in FIFO order.
addFilter($name) : \Zend_View_Abstract
Inherited
Parameters
$name
Returns
\Zend_View_Abstract
Adds to the stack of filter paths in LIFO order.
addFilterPath($path, string $classPrefix = 'Zend_View_Filter_'
) : \Zend_View_Abstract
Inherited
Parameters
$path
$classPrefix
string
Class prefix to use with classes in this
directory; defaults to Zend_View_Filter
Returns
\Zend_View_Abstract
Adds to the stack of helper paths in LIFO order.
addHelperPath($path, string $classPrefix = 'Zend_View_Helper_'
) : \Zend_View_Abstract
Inherited
Parameters
$path
$classPrefix
string
Class prefix to use with classes in this
directory; defaults to Zend_View_Helper
Returns
\Zend_View_Abstract
Adds to the stack of view script paths in LIFO order.
addScriptPath($path) : \Zend_View_Abstract
Inherited
Parameters
$path
Returns
\Zend_View_Abstract
Assigns variables to the view script via differing strategies.
assign(string|array $spec, mixed $value = null
) : \Zend_View_Abstract
Inherited
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).
see |
|
inherited_from |
\Zend_View_Interface::assign() |
Parameters
$spec
$value
Exceptions
\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 |
Returns
\Zend_View_Abstract
Fluent interface
Clear all assigned variables
clearVars() : void
Inherited
Clears all variables assigned to Zend_View either via \assign() or
property overloading (__set()).
inherited_from |
\Zend_View_Interface::clearVars() |
, $name = Zend_View_Helper_Cycle::DEFAULT_NAME)
cycle() :
magic |
|
method |
, $name = Zend_View_Helper_Cycle::DEFAULT_NAME) |
Returns
Escapes a value for output in a view script.
escape(mixed $var) : mixed
Inherited
If escaping mechanism is one of htmlspecialchars or htmlentities, uses
\$_encoding setting.
Parameters
$var
mixed
The output to escape.
Returns
mixed
The escaped value.
formTextarea()
formTextarea() :
Return associative array of path types => paths
getAllPaths() : array
Inherited
Return current escape encoding
getEncoding() : string
Inherited
Return the template engine object
getEngine() : \Zend_View_Abstract
Inherited
Returns the object instance, as it is its own template engine
inherited_from |
\Zend_View_Interface::getEngine() |
Returns
\Zend_View_Abstract
Get a filter object by name
getFilter(string $name) : object
Inherited
Parameters
$name
string
Returns
object
Get full path to a filter class file specified by $name
getFilterPath(string $name) : string | false
Inherited
Parameters
$name
string
Returns
string
false
False on failure, path on success
Returns an array of all currently set filter paths
getFilterPaths() : array
Inherited
Return array of all currently active filters
getFilters() : array
Inherited
Only returns those that have already been instantiated.
Returns
array
Get a helper by name
getHelper(string $name) : object
Inherited
Parameters
$name
string
Returns
object
Get full path to a helper class file specified by $name
getHelperPath(string $name) : string | false
Inherited
Parameters
$name
string
Returns
string
false
False on failure, path on success
Returns an array of all currently set helper paths
getHelperPaths() : array
Inherited
Get array of all active helpers
getHelpers() : array
Inherited
Only returns those that have already been instantiated.
Returns
array
Retrieve plugin loader for a specific plugin type
getPluginLoader(string $type) : \Zend_Loader_PluginLoader
Inherited
Parameters
$type
string
Returns
\Zend_Loader_PluginLoader
Return full path to a view script specified by $name
getScriptPath(string $name) : false | string
Inherited
Parameters
$name
string
Exceptions
\Zend_View_Exception |
if no script directory set |
Returns
false
string
False if script not found
Returns an array of all currently set script paths
getScriptPaths() : array
Inherited
inherited_from |
\Zend_View_Interface::getScriptPaths() |
Returns
array
Return list of all assigned variables
getVars() : array
Inherited
Returns all public properties of the object. Reflection is not used
here as testing reflection properties for visibility is buggy.
Returns
array
, $attribs = array())
gravatar() :
magic |
|
method |
, $attribs = array()) |
Returns
, $type = 'text/javascript')
headScript() :
magic |
|
method |
, $type = 'text/javascript') |
Returns
headTitle()
headTitle() :
, array $params = array(), $content = null)
htmlFlash() :
magic |
|
method |
, array $params = array(), $content = null) |
Returns
, array $params = array(), $content = null)
htmlObject() :
magic |
|
method |
, array $params = array(), $content = null) |
Returns
, array $params = array(), $content = null)
htmlPage() :
magic |
|
method |
, array $params = array(), $content = null) |
Returns
, array $params = array(), $content = null)
htmlQuicktime() :
magic |
|
method |
, array $params = array(), $content = null) |
Returns
Allow custom object initialization when extending Zend_View_Abstract or
Zend_View
init() : void
Inherited
Triggered by __construct() as its final action.
, $type = 'text/javascript')
inlineScript() :
magic |
|
method |
, $type = 'text/javascript') |
Returns
Return status of LFI protection flag
isLfiProtectionOn() : boolean
Inherited
navigation()
navigation() :
partialLoop()
partialLoop() :
placeholder()
placeholder() :
Registers a helper object, bypassing plugin loader
registerHelper(\Zend_View_Helper_Abstract|object $helper, string $name) : \Zend_View_Abstract
Inherited
Parameters
$helper
\Zend_View_Helper_Abstract
object
$name
string
Exceptions
Returns
\Zend_View_Abstract
Processes a view script and returns the output.
render(string $name) : string
Inherited
inherited_from |
\Zend_View_Interface::render() |
Parameters
$name
string
The script name to process.
Returns
string
The script output.
renderToPlaceholder()
renderToPlaceholder() :
serverUrl()
serverUrl() :
Given a base path, sets the script, helper, and filter paths relative to it
setBasePath(string $path, string $classPrefix = 'Zend_View'
) : \Zend_View_Abstract
Inherited
Assumes a directory structure of:
basePath/
scripts/
helpers/
filters/
inherited_from |
\Zend_View_Interface::setBasePath() |
Parameters
$path
string
$classPrefix
Returns
\Zend_View_Abstract
Set encoding to use with htmlentities() and htmlspecialchars()
setEncoding(string $encoding) : \Zend_View_Abstract
Inherited
Parameters
$encoding
string
Returns
\Zend_View_Abstract
Sets the _escape() callback.
setEscape(mixed $spec) : \Zend_View_Abstract
Inherited
Parameters
$spec
mixed
The callback for _escape() to use.
Returns
\Zend_View_Abstract
Resets the filter stack.
setFilter($name) : \Zend_View_Abstract
Inherited
To clear all filters, use Zend_View::setFilter(null).
Parameters
$name
Returns
\Zend_View_Abstract
Resets the stack of filter paths.
setFilterPath($path, string $classPrefix = 'Zend_View_Filter_'
) : \Zend_View_Abstract
Inherited
To clear all paths, use Zend_View::setFilterPath(null).
Parameters
$path
$classPrefix
string
The class prefix to apply to all elements in
$path; defaults to Zend_View_Filter
Returns
\Zend_View_Abstract
Resets the stack of helper paths.
setHelperPath(string|array $path, string $classPrefix = 'Zend_View_Helper_'
) : \Zend_View_Abstract
Inherited
To clear all paths, use Zend_View::setHelperPath(null).
Parameters
$path
string
array
The directory (-ies) to set as the path.
$classPrefix
string
The class prefix to apply to all elements in
$path; defaults to Zend_View_Helper
Returns
\Zend_View_Abstract
Set LFI protection flag
setLfiProtection(boolean $flag) : \Zend_View_Abstract
Inherited
Parameters
$flag
boolean
Returns
\Zend_View_Abstract
Set plugin loader for a particular plugin type
setPluginLoader(\Zend_Loader_PluginLoader $loader, string $type) : \Zend_View_Abstract
Inherited
Parameters
$loader
\Zend_Loader_PluginLoader
$type
string
Returns
\Zend_View_Abstract
Resets the stack of view script paths.
setScriptPath($path) : \Zend_View_Abstract
Inherited
To clear all paths, use Zend_View::setScriptPath(null).
inherited_from |
\Zend_View_Interface::setScriptPath() |
Parameters
$path
Returns
\Zend_View_Abstract
Set flag indicating if stream wrapper should be used if short_open_tag is off
setUseStreamWrapper(boolean $flag) : \Zend_View
Parameters
$flag
boolean
Returns
\Zend_View
Enable or disable strict vars
strictVars(boolean $flag = true
) : \Zend_View_Abstract
Inherited
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.
Parameters
$flag
boolean
Returns
\Zend_View_Abstract
translate()
translate() :
, $name = null, $reset = false, $encode = true)
url() :
magic |
|
method |
, $name = null, $reset = false, $encode = true) |
Returns
Should the stream wrapper be used if short_open_tag is off?
useStreamWrapper() : boolean
userAgent()
userAgent() :
Includes the view script in a scope with only public $this variables.
_run()
inherited_from |
\Zend_View_Abstract::_run() |
Use to include the view script in a scope that only allows public
members.
_run() : mixed
Inherited
Finds a view script from the available directories.
_script(string $name) : void
Inherited
Parameters
$name
string
The base name of the script.
Adds paths to the path stack in LIFO order.
_addPath(string $type, string|array $path, string $prefix = null
) : void
Inherited
Zend_View::_addPath($type, 'dirname') adds one directory
to the path stack.
Zend_View::_addPath($type, $array) adds one directory for
each array element value.
In the case of filter and helper paths, $prefix should be used to
specify what class prefix to use with the given path.
Parameters
$type
string
The path type ('script', 'helper', or 'filter').
$path
string
array
The path specification.
$prefix
string
Class prefix to use with path (helpers and filters
only)
Add a prefixPath for a plugin type
_addPluginPath(string $type, string $classPrefix, array $paths) : \Zend_View_Abstract
Inherited
Parameters
$type
string
$classPrefix
string
$paths
array
Returns
\Zend_View_Abstract
Applies the filter callback to a buffer.
_filter(string $buffer) : string
Inherited
Parameters
$buffer
string
The buffer contents.
Returns
string
The filtered buffer.
Return all paths for a given path type
_getPaths(string $type) : array
Inherited
Parameters
$type
string
The path type ('helper', 'filter', 'script')
Returns
array
Retrieve a plugin object
_getPlugin(string $type, string $name) : object
Inherited
Parameters
$type
string
$name
string
Returns
object
Get a path to a given plugin class of a given type
_getPluginPath(string $type, string $name) : string | false
Inherited
Parameters
$type
string
$name
string
Returns
string
false
Register filter class as loaded
_setFilterClass(string $name, string $class, string $file) : void
Inherited
Parameters
$name
string
$class
string
$file
string
path to class file
Register helper class as loaded
_setHelperClass(string $name, string $class, string $file) : void
Inherited
Parameters
$name
string
$class
string
$file
string
path to class file
Resets the path stack for helpers and filters.
_setPath(string $type, string|array $path, string $classPrefix = null
)
Inherited
Parameters
$type
string
The path type ('helper' or 'filter').
$path
string
array
The directory (-ies) to set as the path.
$classPrefix
string
Class prefix to apply to elements of $path
Properties
Encoding to use in escaping mechanisms; defaults to utf-8
$_encoding : string
Callback for escaping.
$_escape : string
Default
'htmlspecialchars'
Script file name to execute
$_file : string
Stack of Zend_View_Filter names to apply as filters.
$_filter : array
Stack of Zend_View_Filter objects that have been loaded
$_filterClass : array
Map of filter => class pairs to help in determining filter class from
name
$_filterLoaded : array
Map of filter => classfile pairs to aid in determining filter classfile
$_filterLoadedDir : array
Instances of helper objects.
$_helper : array
Map of helper => class pairs to help in determining helper class from
name
$_helperLoaded : array
Map of helper => classfile pairs to aid in determining helper classfile
$_helperLoadedDir : array
Flag indicating whether or not LFI protection for rendering view scripts is enabled
$_lfiProtectionOn : boolean
Plugin types
$_loaderTypes : array
Default
array('filter', 'helper')
Plugin loaders
$_loaders : array
Path stack for script, helper, and filter directories.
$_path : array
Default
array('script' => array(), 'helper' => array(), 'filter' => array())
Strict variables flag; when on, undefined variables accessed in the view
scripts will trigger notices
$_strictVars : boolean
Whether or not to use stream wrapper if short_open_tag is false
$_useStreamWrapper : boolean
Whether or not to use streams to mimic short tags
$_useViewStream : boolean