Class for Zend\View\Strategy\PhpRendererStrategy to help enforce private constructs.
Note: all private variables in this class are prefixed with "__". This is to
mark them as part of the internal implementation, and thus prevent conflict
with variables injected into the renderer.
Convenience methods for build in helpers (@see __call):
Methods
Overloading: proxy to helpers
__call(string $method, array $argv) : mixed
Proxies to the attached plugin manager to retrieve, return, and potentially
execute helpers.
- If the helper does not define __invoke, it will be returned
- If the helper does define __invoke, it will be called as a functor
Parameters
$method
string
$argv
array
Returns
mixed
Constructor.
__construct(array $config)
todo |
handle passing helper plugin manager, options |
todo |
handle passing filter chain, options |
todo |
handle passing variables object, options |
todo |
handle passing resolver object, options |
Parameters
$config
array
Configuration key-value pairs.
Overloading: proxy to Variables container
__get(string $name) : mixed
Parameters
$name
string
Returns
mixed
Overloading: proxy to Variables container
__isset(string $name) : bool
Parameters
$name
string
Returns
bool
Overloading: proxy to Variables container
__set(string $name, mixed $value) : void
Parameters
$name
string
$value
mixed
Overloading: proxy to Variables container
__unset(string $name) : void
basePath()
basePath($file =) : string | null
Parameters
=
$file
Returns
string
null
Can we render trees, or are we configured to do so?
canRenderTrees() : bool
, $name = \Zend\View\Helper\Cycle::DEFAULT_NAME)
cycle(array $data) : \Zend\View\Helper\Cycle
magic |
|
method |
, $name = \Zend\View\Helper\Cycle::DEFAULT_NAME) |
Parameters
$data
array
Returns
escapeCss()
escapeCss( $value, $recurse =) : mixed
Parameters
$value
=
$recurse
Returns
mixed
escapeHtml()
escapeHtml( $value, $recurse =) : mixed
Parameters
$value
=
$recurse
Returns
mixed
escapeHtmlAttr()
escapeHtmlAttr( $value, $recurse =) : mixed
Parameters
$value
=
$recurse
Returns
mixed
escapeJs()
escapeJs( $value, $recurse =) : mixed
Parameters
$value
=
$recurse
Returns
mixed
escapeUrl()
escapeUrl( $value, $recurse =) : mixed
Parameters
$value
=
$recurse
Returns
mixed
Get a single variable
get(mixed $key) : mixed
Parameters
$key
mixed
Returns
mixed
, $attribs = array())
gravatar($email =, $options =) : \Zend\View\Helper\Gravatar
magic |
|
method |
, $attribs = array()) |
Parameters
=
$email$options
=
$email$options
Returns
headLink()
headLink(array $attributes, $placement =) : \Zend\View\Helper\HeadLink
Parameters
$attributes
array
=
$placement
Returns
, $type = 'text/javascript')
headScript($mode =, $spec =, $placement =, array $attrs) : \Zend\View\Helper\HeadScript
magic |
|
method |
, $type = 'text/javascript') |
Parameters
=
$mode$spec$placement
=
$mode$spec$placement
=
$mode$spec$placement
$attrs
array
Returns
)
headStyle($content =, $placement =, $attributes =) : \Zend\View\Helper\HeadStyle
Parameters
=
$content$placement$attributes
=
$content$placement$attributes
=
$content$placement$attributes
Returns
, array $params = array(), $content = null)
htmlFlash( $data, array $attribs) : string
magic |
|
method |
, array $params = array(), $content = null) |
Parameters
$data
$attribs
array
Returns
string
htmlList()
htmlList(array $items, $ordered =, $attribs =, $escape =) : string
Parameters
$items
array
=
$ordered$attribs$escape
=
$ordered$attribs$escape
=
$ordered$attribs$escape
Returns
string
, array $params = array(), $content = null)
htmlObject($data =, $type =, array $attribs) : string
magic |
|
method |
, array $params = array(), $content = null) |
Parameters
=
$data$type
=
$data$type
$attribs
array
Returns
string
, array $params = array(), $content = null)
htmlPage( $data, array $attribs) : string
magic |
|
method |
, array $params = array(), $content = null) |
Parameters
$data
$attribs
array
Returns
string
, array $params = array(), $content = null)
htmlQuicktime( $data, array $attribs) : string
magic |
|
method |
, array $params = array(), $content = null) |
Parameters
$data
$attribs
array
Returns
string
identity()
identity() : mixed | null
Allow custom object initialization when extending PhpRenderer
init() : void
, $type = 'text/javascript')
inlineScript($mode =, $spec =, $placement =, array $attrs) : \Zend\View\Helper\InlineScript
magic |
|
method |
, $type = 'text/javascript') |
Parameters
=
$mode$spec$placement
=
$mode$spec$placement
=
$mode$spec$placement
$attrs
array
Returns
)
json( $data, array $jsonOptions) : string | void
Parameters
$data
$jsonOptions
array
Returns
string
void
partialLoop()
partialLoop($name =, $values =) : string
Parameters
=
$name$values
=
$name$values
Returns
string
Get plugin instance
plugin(string $name, array $options) : \Zend\View\Helper\AbstractHelper
Parameters
$name
string
Name of plugin to return
$options
nullarray
Options to pass to plugin constructor (if not already instantiated)
Returns
Processes a view script and returns the output.
render(string | \Zend\View\Model\ModelInterface $nameOrModel, null | array | \Traversable $values) : string
Parameters
$nameOrModel
string\Zend\View\Model\ModelInterface
Either the template to use, or a ViewModel. The ViewModel must have the template as an option in order to be valid.
$values
nullarray\Traversable
Values to use when rendering. If none provided, uses those in the composed variables container.
Exceptions
Returns
string
The script output.
renderChildModel()
renderChildModel( $child) : string
Parameters
$child
Returns
string
renderToPlaceholder()
renderToPlaceholder( $script, $placeholder) : void
Parameters
$script
$placeholder
serverUrl()
serverUrl($requestUri =) : string
Parameters
=
$requestUri
Returns
string
Set flag indicating whether or not we should render trees of view models
setCanRenderTrees(bool $renderTrees) : \Zend\View\Renderer\PhpRenderer
If set to true, the View instance will not attempt to render children
separately, but instead pass the root view model directly to the PhpRenderer.
It is then up to the developer to render the children from within the
view script.
Parameters
$renderTrees
bool
Returns
Set variable storage
setVars(array | \ArrayAccess $variables) : \Zend\View\Renderer\PhpRenderer
Expects either an array, or an object implementing ArrayAccess.
Parameters
$variables
array\ArrayAccess
Exceptions
Returns
, $options = array(), $reuseMatchedParams = false)
url($name =, array $params) : string
magic |
|
method |
, $options = array(), $reuseMatchedParams = false) |
Parameters
=
$name
$params
array
Returns
string
Get a single variable, or all variables
vars(mixed $key) : mixed
Parameters
$key
mixed
Returns
mixed
Properties
<p>Rendered content</p>
$__content : string
Script file name to execute
$__file : string
<p>Whether or not to render trees of view models</p>
$__renderTrees : bool
Template being rendered
$__template : null | string
Queue of templates to render
$__templates : array
<p>ArrayAccess or associative array representing available variables</p>
$__vars : \ArrayAccess | array
<p>Temporary variable stack; used when variables passed to render()</p>
$__varsCache : array