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.
Abstract class for Zend_View to help enforce private constructs.
string $_encoding = 'UTF-8'Encoding to use in escaping mechanisms; defaults to utf-8
Detailsstring $_escape = 'htmlspecialchars'Callback for escaping.
Detailsstring $_file = 'null'Script file name to execute
Detailsarray $_filter = 'array'Stack of Zend_View_Filter names to apply as filters.
Detailsarray $_filterClass = 'array'Stack of Zend_View_Filter objects that have been loaded
Detailsarray $_filterLoaded = 'array'Map of filter => class pairs to help in determining filter class from name
Detailsarray $_filterLoadedDir = 'array'Map of filter => classfile pairs to aid in determining filter classfile
Detailsarray $_helper = 'array'Instances of helper objects.
Detailsarray $_helperLoaded = 'array'Map of helper => class pairs to help in determining helper class from name
Detailsarray $_helperLoadedDir = 'array'Map of helper => classfile pairs to aid in determining helper classfile
Detailsbool $_lfiProtectionOn = 'true'Flag indicating whether or not LFI protection for rendering view scripts is enabled
Detailsarray $_loaderTypes = 'array'Plugin types
Detailsarray $_loaders = 'array'Plugin loaders
Detailsarray $_path = 'array'Path stack for script, helper, and filter directories.
Detailsboolean $_strictVars = 'false'Strict variables flag; when on, undefined variables accessed in the view scripts will trigger notices
Details__call(
string $name, array $args
)
:
stringAccesses a helper object from within a script.
If the helper class has a 'view' property, sets it with the current view object.
Details__construct(
array $config
=
array
)
:
Constructor.
Details__get(
string $key
)
:
nullPrevent E_NOTICE for nonexistent values
If {@link strictVars()} is on, raises a notice.
Details__isset(
string $key
)
:
booleanAllows testing with empty() and isset() to work inside templates.
Details__set(
string $key, mixed $val
)
:
voidDirectly 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.
Details__unset(
string $key
)
:
voidAllows unset() on object properties to work
Details_addPath(
string $type, string|array $path, string $prefix
=
null
)
:
voidAdds paths to the path stack in LIFO order.
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.
Details_addPluginPath(
string $type, string $classPrefix, array $paths
)
:
Zend_View_AbstractAdd a prefixPath for a plugin type
Details_filter(
string $buffer
)
:
stringApplies the filter callback to a buffer.
Details_getPaths(
string $type
)
:
arrayReturn all paths for a given path type
Details_getPlugin(
string $type, string $name
)
:
objectRetrieve a plugin object
Details_getPluginPath(
string $type, string $name
)
:
string|falseGet a path to a given plugin class of a given type
Details_run(
)
:
mixedUse to include the view script in a scope that only allows public members.
Details_script(
$name $name
)
:
voidFinds a view script from the available directories.
Details_setFilterClass(
string $name, string $class, string $file
)
:
voidRegister filter class as loaded
Details_setHelperClass(
string $name, string $class, string $file
)
:
voidRegister helper class as loaded
Details_setPath(
string $type, string|array $path, string $classPrefix
=
null
)
:
Resets the path stack for helpers and filters.
DetailsaddBasePath(
string $path, $classPrefix
=
Zend_View
)
:
Zend_View_AbstractGiven a base path, add script, helper, and filter paths relative to it
Assumes a directory structure of:
basePath/
scripts/
helpers/
filters/
DetailsaddFilter(
string|array $name
)
:
Zend_View_AbstractAdd one or more filters to the stack in FIFO order.
DetailsaddFilterPath(
string|array $path, string $classPrefix
=
Zend_View_Filter_
)
:
Zend_View_AbstractAdds to the stack of filter paths in LIFO order.
DetailsaddHelperPath(
string|array $path, string $classPrefix
=
Zend_View_Helper_
)
:
Zend_View_AbstractAdds to the stack of helper paths in LIFO order.
DetailsaddScriptPath(
string|array $path
)
:
Zend_View_AbstractAdds to the stack of view script paths in LIFO order.
Detailsassign(
string|array $spec, mixed $value
=
null
)
:
Zend_View_AbstractAssigns 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).
DetailsclearVars(
)
:
voidClear all assigned variables
Clears all variables assigned to Zend_View either via {@link assign()} or property overloading ({@link __set()}).
Detailsescape(
mixed $var
)
:
mixedEscapes a value for output in a view script.
If escaping mechanism is one of htmlspecialchars or htmlentities, uses {@link $_encoding} setting.
DetailsgetAllPaths(
)
:
arrayReturn associative array of path types => paths
DetailsgetEncoding(
)
:
stringReturn current escape encoding
DetailsgetEngine(
)
:
Zend_View_AbstractReturn the template engine object
Returns the object instance, as it is its own template engine
DetailsgetFilter(
string $name
)
:
objectGet a filter object by name
DetailsgetFilterPath(
string $name
)
:
string|falseGet full path to a filter class file specified by $name
DetailsgetFilterPaths(
)
:
arrayReturns an array of all currently set filter paths
DetailsgetFilters(
)
:
arrayReturn array of all currently active filters
Only returns those that have already been instantiated.
DetailsgetHelper(
string $name
)
:
objectGet a helper by name
DetailsgetHelperPath(
string $name
)
:
string|falseGet full path to a helper class file specified by $name
DetailsgetHelperPaths(
)
:
arrayReturns an array of all currently set helper paths
DetailsgetHelpers(
)
:
arrayGet array of all active helpers
Only returns those that have already been instantiated.
DetailsgetPluginLoader(
string $type
)
:
Zend_Loader_PluginLoaderRetrieve plugin loader for a specific plugin type
DetailsgetScriptPath(
string $name
)
:
false|stringReturn full path to a view script specified by $name
DetailsgetScriptPaths(
)
:
arrayReturns an array of all currently set script paths
DetailsgetVars(
)
:
arrayReturn 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.
Detailsinit(
)
:
voidAllow custom object initialization when extending Zend_View_Abstract or Zend_View
Triggered by {@link __construct() the constructor} as its final action.
DetailsisLfiProtectionOn(
)
:
boolReturn status of LFI protection flag
DetailsregisterHelper(
Zend_View_Helper_Abstract|object $helper, string $name
)
:
Zend_View_AbstractRegisters a helper object, bypassing plugin loader
Detailsrender(
string $name
)
:
stringProcesses a view script and returns the output.
DetailssetBasePath(
string $path, $classPrefix
=
Zend_View
)
:
Zend_View_AbstractGiven a base path, sets the script, helper, and filter paths relative to it
Assumes a directory structure of:
basePath/
scripts/
helpers/
filters/
DetailssetEncoding(
string $encoding
)
:
Zend_View_AbstractSet encoding to use with htmlentities() and htmlspecialchars()
DetailssetEscape(
mixed $spec
)
:
Zend_View_AbstractSets the _escape() callback.
DetailssetFilter(
string|array $name
)
:
Zend_View_AbstractResets the filter stack.
To clear all filters, use Zend_View::setFilter(null).
DetailssetFilterPath(
string|array $path, string $classPrefix
=
Zend_View_Filter_
)
:
Zend_View_AbstractResets the stack of filter paths.
To clear all paths, use Zend_View::setFilterPath(null).
DetailssetHelperPath(
string|array $path, string $classPrefix
=
Zend_View_Helper_
)
:
Zend_View_AbstractResets the stack of helper paths.
To clear all paths, use Zend_View::setHelperPath(null).
DetailssetLfiProtection(
bool $flag
)
:
Zend_View_AbstractSet LFI protection flag
DetailssetPluginLoader(
Zend_Loader_PluginLoader $loader, string $type
)
:
Zend_View_AbstractSet plugin loader for a particular plugin type
DetailssetScriptPath(
string|array $path
)
:
Zend_View_AbstractResets the stack of view script paths.
To clear all paths, use Zend_View::setScriptPath(null).
DetailsstrictVars(
boolean $flag
=
true
)
:
Zend_View_AbstractEnable or disable strict vars
If strict variables are enabled, {@link __get()} will raise a notice when a variable is not defined.
Use in conjunction with {@link Zend_View_Helper_DeclareVars the declareVars() helper} to enforce strict variable handling in your view scripts.
Details