category Zend
package Zend_View
subpackage Model

 Methods

Constructor

__construct(null | array | \Traversable $variables, array | \Traversable $options) 

Parameters

$variables

nullarray\Traversable

$options

array\Traversable

Property overloading: get variable value

__get(string $name) : mixed

Parameters

$name

string

Returns

mixed

Property overloading: do we have the requested variable value?

__isset(string $name) : bool

Parameters

$name

string

Returns

bool

Property overloading: set variable value

__set(string $name, mixed $value) : void

Parameters

$name

string

$value

mixed

Property overloading: unset the requested variable

__unset(string $name) : void

Parameters

$name

string

Add a child model

addChild(\Zend\View\Model\ModelInterface $child, null | string $captureTo, null | bool $append) : \Zend\View\Model\ViewModel

Parameters

$captureTo

nullstring

Optional; if specified, the "capture to" value to set on the child

$append

nullbool

Optional; if specified, append to child with the same capture

Returns

Get the name of the variable to which to capture this model

captureTo() : string

Returns

string

Return count of children

count() : int

Returns

int

Return all children.

getChildren() : array

Return specifies an array, but may be any iterable object.

Returns

array

Get iterator of children

getIterator() : \ArrayIterator

Returns

Get a single option

getOption(string $name, mixed | null $default) : mixed

Parameters

$name

string

The option to get.

$default

mixednull

(optional) A default value if the option is not yet set.

Returns

mixed

Get renderer options/hints

getOptions() : array

Returns

array

Get the template to be used by this model

getTemplate() : string

Returns

string

Get a single view variable

getVariable(string $name, mixed | null $default) : mixed

Parameters

$name

string

$default

mixednull

(optional) default value if the variable is not present.

Returns

mixed

Get view variables

getVariables() : array | \ArrayAccess | \Traversable

Returns

array\ArrayAccess\Traversable

Does the model have any children?

hasChildren() : bool

Returns

bool

Is this append to child with the same capture?

isAppend() : bool

Returns

bool

Set flag indicating whether or not append to child with the same capture

setAppend(bool $append) : \Zend\View\Model\ViewModel

Parameters

$append

bool

Returns

Set the name of the variable to capture this model to, if it is a child model

setCaptureTo(string $capture) : \Zend\View\Model\ViewModel

Parameters

$capture

string

Returns

Set a single option

setOption(string $name, mixed $value) : \Zend\View\Model\ViewModel

Parameters

$name

string

$value

mixed

Returns

Set renderer options/hints en masse

setOptions(array | \Traversable $options) : \Zend\View\Model\ViewModel

Parameters

$options

array\Traversable

Exceptions

\Zend\View\Exception\InvalidArgumentException

Returns

Set the template to be used by this model

setTemplate(string $template) : \Zend\View\Model\ViewModel

Parameters

$template

string

Returns

Set flag indicating whether or not this is considered a terminal or standalone model

setTerminal(bool $terminate) : \Zend\View\Model\ViewModel

Parameters

$terminate

bool

Returns

Set view variable

setVariable(string $name, mixed $value) : \Zend\View\Model\ViewModel

Parameters

$name

string

$value

mixed

Returns

Set view variables en masse

setVariables(array | \ArrayAccess | \Traversable $variables, bool $overwrite) : \Zend\View\Model\ViewModel

Can be an array or a Traversable + ArrayAccess object.

Parameters

$variables

array\ArrayAccess\Traversable

$overwrite

bool

Whether or not to overwrite the internal container with $variables

Exceptions

\Zend\View\Exception\InvalidArgumentException

Returns

Is this considered a terminal or standalone model?

terminate() : bool

Returns

bool

 Properties

 

Is this append to child with the same capture?

$append : bool

 

What variable a parent model should capture this model to

$captureTo : string

 

Child models

$children : array

 

Renderer options

$options : array

 

Template to use when rendering this model

$template : string

 

Is this a standalone, or terminal, model?

$terminate : bool

 

View variables

$variables : array | \Zend\View\Model\ArrayAccessTraversable