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):

package Default

 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

Make sure View variables are cloned when the view is cloned.

__clone() : \Zend\View\Renderer\PhpRenderer

Returns

\Zend\View\Renderer\PhpRenderer

Constructor.

__construct(array $config = array()
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) : boolean

Parameters

$name

string

Returns

boolean

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

Parameters

$name

string

Add a template to the stack

addTemplate(string $template) : \Zend\View\Renderer\PhpRenderer

Parameters

$template

string

Returns

\Zend\View\Renderer\PhpRenderer

basePath()

basePath() : 
magic
method

Returns

breadCrumbs()

breadCrumbs() : 
magic
method

Returns

Can we render trees, or are we configured to do so?

canRenderTrees() : boolean
inherited_from \Zend\View\Renderer\TreeRendererInterface::canRenderTrees()

Returns

boolean

, $name = \Zend\View\Helper\Cycle::DEFAULT_NAME)

cycle() : 
magic
method , $name = \Zend\View\Helper\Cycle::DEFAULT_NAME)

Returns

declareVars()

declareVars() : 
magic
method

Returns

doctype()

doctype() : 
magic
method

Returns

escapeCss()

escapeCss() : 
magic
method

Returns

escapeHtml()

escapeHtml() : 
magic
method

Returns

escapeHtmlAttr()

escapeHtmlAttr() : 
magic
method

Returns

escapeJs()

escapeJs() : 
magic
method

Returns

escapeUrl()

escapeUrl() : 
magic
method

Returns

flashMessenger()

flashMessenger() : 
magic
method

Returns

Get a single variable

get(mixed $key) : mixed

Parameters

$key

mixed

Returns

mixed

Return the template engine object

getEngine() : \Zend\View\Renderer\PhpRenderer

Returns the object instance, as it is its own template engine

inherited_from \Zend\View\Renderer\RendererInterface::getEngine()

Returns

\Zend\View\Renderer\PhpRenderer

Retrieve filter chain for post-filtering script content

getFilterChain() : \Zend\Filter\FilterChain

Returns

\Zend\Filter\FilterChain

Get helper plugin manager instance

getHelperPluginManager() : \Zend\View\HelperPluginManager

Returns

\Zend\View\HelperPluginManager

, $attribs = array())

gravatar() : 
magic
method , $attribs = array())

Returns

, $placement = \Zend\View\Helper\Placeholder\Container\AbstractContainer::APPEND)

headMeta() : 
magic
method , $placement = \Zend\View\Helper\Placeholder\Container\AbstractContainer::APPEND)

Returns

, $type = 'text/javascript')

headScript() : 
magic
method , $type = 'text/javascript')

Returns

)

headStyle() : 
magic
method )

Returns

headTitle()

headTitle() : 
magic
method

Returns

, array $params = array(), $content = null)

htmlFlash() : 
magic
method , array $params = array(), $content = null)

Returns

htmlList()

htmlList() : 
magic
method

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

identity()

identity() : 
magic
method

Returns

Allow custom object initialization when extending PhpRenderer

init() : void

Triggered by __construct() as its final action.

, $type = 'text/javascript')

inlineScript() : 
magic
method , $type = 'text/javascript')

Returns

)

json() : 
magic
method )

Returns

layout()

layout() : 
magic
method

Returns

menu()

menu() : 
magic
method

Returns

navigation()

navigation() : 
magic
method

Returns

paginationControl()

paginationControl() : 
magic
method

Returns

partial()

partial() : 
magic
method

Returns

partialLoop()

partialLoop() : 
magic
method

Returns

placeHolder()

placeHolder() : 
magic
method

Returns

Get plugin instance

plugin(string $name, null|array $options = null) : \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

\Zend\View\Helper\AbstractHelper

Processes a view script and returns the output.

render(string|\Zend\View\Model\ModelInterface $nameOrModel, null|array|\Traversable $values = null) : string
inherited_from \Zend\View\Renderer\RendererInterface::render()

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

\Zend\View\Exception\DomainException if a ViewModel is passed, but does not contain a template option.
\Zend\View\Exception\InvalidArgumentException if the values passed are not an array or ArrayAccess object
\Zend\View\Exception\RuntimeException if the template cannot be rendered

Returns

stringThe script output.

renderChildModel()

renderChildModel() : 
magic
method

Returns

renderToPlaceholder()

renderToPlaceholder() : 
magic
method

Returns

Retrieve template name or template resolver

resolver(null|string $name = null) : string | \Zend\View\Resolver\ResolverInterface

Parameters

$name

nullstring

Returns

string\Zend\View\Resolver\ResolverInterface

serverUrl()

serverUrl() : 
magic
method

Returns

Set flag indicating whether or not we should render trees of view models

setCanRenderTrees(boolean $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

boolean

Returns

\Zend\View\Renderer\PhpRenderer

Set filter chain

setFilterChain(\Zend\Filter\FilterChain $filters) : \Zend\View\Renderer\PhpRenderer

Parameters

$filters

\Zend\Filter\FilterChain

Returns

\Zend\View\Renderer\PhpRenderer

Set helper plugin manager instance

setHelperPluginManager(string|\Zend\View\HelperPluginManager $helpers) : \Zend\View\Renderer\PhpRenderer

Parameters

$helpers

string\Zend\View\HelperPluginManager

Exceptions

\Zend\View\Exception\InvalidArgumentException

Returns

\Zend\View\Renderer\PhpRenderer

Set script resolver

setResolver(\Zend\View\Resolver\ResolverInterface $resolver) : \Zend\View\Renderer\PhpRenderer
inherited_from \Zend\View\Renderer\RendererInterface::setResolver()

Parameters

$resolver

\Zend\View\Resolver\ResolverInterface

Exceptions

\Zend\View\Exception\InvalidArgumentException

Returns

\Zend\View\Renderer\PhpRenderer

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

\Zend\View\Exception\InvalidArgumentException

Returns

\Zend\View\Renderer\PhpRenderer

sitemap()

sitemap() : 
magic
method

Returns

, $options = array(), $reuseMatchedParams = false)

url() : 
magic
method , $options = array(), $reuseMatchedParams = false)

Returns

Get a single variable, or all variables

vars(mixed $key = null) : mixed

Parameters

$key

mixed

Returns

mixed

viewModel()

viewModel() : 
magic
method

Returns

 Properties

 

Rendered content

$__content : string

Default

''
 

Script file name to execute

$__file : string

Default

null
 

$__filterChain

$__filterChain : \Zend\Filter\FilterChain

Default

 

Helper plugin manager

$__helpers : \Zend\View\HelperPluginManager

Default

 

Whether or not to render trees of view models

$__renderTrees : boolean

Default

false
 

Template being rendered

$__template : null | string

Default

null
 

Template resolver

$__templateResolver : \Zend\View\Resolver\ResolverInterface

Default

 

Queue of templates to render

$__templates : array

Default

array()
 

ArrayAccess or associative array representing available variables

$__vars : \ArrayAccess | array

Default

 

Temporary variable stack; used when variables passed to render()

$__varsCache : array

Default

array()