Abstract class for Zend_View 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

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

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

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

Parameters

$name

string

Add a template to the stack

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

Parameters

$template

string

Returns

basePath()

basePath($file =) : \Zend\View\Helper\BasePath

magic
method

Parameters

=

$file

Returns

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

canRenderTrees() : bool

Returns

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

declareVars()

declareVars() : \Zend\View\Helper\DeclareVars

magic
method

Returns

doctype()

doctype($doctype =) : \Zend\View\Helper\Doctype

magic
method

Parameters

=

$doctype

Returns

escapeCss()

escapeCss( $value, $recurse =) : mixed

magic
method

Parameters

$value

=

$recurse

Returns

mixed

escapeHtml()

escapeHtml( $value, $recurse =) : mixed

magic
method

Parameters

$value

=

$recurse

Returns

mixed

escapeHtmlAttr()

escapeHtmlAttr( $value, $recurse =) : mixed

magic
method

Parameters

$value

=

$recurse

Returns

mixed

escapeJs()

escapeJs( $value, $recurse =) : mixed

magic
method

Parameters

$value

=

$recurse

Returns

mixed

escapeUrl()

escapeUrl( $value, $recurse =) : mixed

magic
method

Parameters

$value

=

$recurse

Returns

mixed

flashMessenger()

flashMessenger($namespace =) : \Zend\View\Helper\FlashMessenger

magic
method

Parameters

=

$namespace

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

Returns

Retrieve filter chain for post-filtering script content

getFilterChain() : \Zend\Filter\FilterChain

Get helper plugin manager instance

getHelperPluginManager() : \Zend\View\HelperPluginManager

, $attribs = array())

gravatar($email =, $options =) : \Zend\View\Helper\Gravatar

magic
method , $attribs = array())

Parameters

=

$email$options

=

$email$options

Returns

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

headMeta($content =, $keyValue =, $keyType =, $modifiers =) : \Zend\View\Helper\HeadMeta

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

Parameters

=

$content$keyValue$keyType$modifiers

=

$content$keyValue$keyType$modifiers

=

$content$keyValue$keyType$modifiers

=

$content$keyValue$keyType$modifiers

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

magic
method )

Parameters

=

$content$placement$attributes

=

$content$placement$attributes

=

$content$placement$attributes

Returns

headTitle()

headTitle($title =, $setType =) : \Zend\View\Helper\HeadTitle

magic
method

Parameters

=

$title$setType

=

$title$setType

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

magic
method

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

magic
method

Returns

mixednull

Allow custom object initialization when extending Zend_View_Abstract or Zend_View

init() : void

Triggered by the constructor as its final action.

, $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

magic
method )

Parameters

$data

$jsonOptions

array

Returns

stringvoid

layout()

layout($template =) : \Zend\View\Helper\Layout

magic
method

Parameters

=

$template

Returns

paginationControl()

paginationControl(\Zend\Paginator\Paginator $paginator, $scrollingStyle =, $partial =, $params =) : string

magic
method

Parameters

=

$scrollingStyle$partial$params

=

$scrollingStyle$partial$params

=

$scrollingStyle$partial$params

Returns

string

partial()

partial($name =, $values =) : string | \Zend\View\Helper\Partial

magic
method

Parameters

=

$name$values

=

$name$values

Returns

partialLoop()

partialLoop($name =, $values =) : string

magic
method

Parameters

=

$name$values

=

$name$values

Returns

string

placeHolder()

placeHolder($name =) : \Zend\View\Helper\Placeholder\Container\AbstractContainer

magic
method

Parameters

=

$name

Returns

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

\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( $child) : string

magic
method

Parameters

$child

Returns

string

renderToPlaceholder()

renderToPlaceholder( $script,  $placeholder) : void

magic
method

Parameters

$script

$placeholder

Retrieve template name or template resolver

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

Parameters

$name

nullstring

Returns

serverUrl()

serverUrl($requestUri =) : string

magic
method

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 filter chain

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

Set helper plugin manager instance

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

Set script resolver

setResolver(\Zend\View\Resolver\ResolverInterface $resolver) : \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

sitemap()

sitemap($container =) : \Zend\View\Helper\Navigation\Sitemap

magic
method

Parameters

=

$container

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

viewModel()

viewModel() : \Zend\View\Helper\ViewModel

magic
method

Returns

 Properties

 

<p>Rendered content</p>

$__content : string

 

Script file name to execute

$__file : string

 

$__filterChain

$__filterChain : \Zend\Filter\FilterChain

 

Helper plugin manager

$__helpers : \Zend\View\HelperPluginManager

 

<p>Cache for the plugin call</p>

$__pluginCache : array

 

<p>Whether or not to render trees of view models</p>

$__renderTrees : bool

 

Template being rendered

$__template : null | string

 

Template resolver

$__templateResolver : \Zend\View\Resolver\ResolverInterface

 

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