Zend\View\Model\JsonModel
Synopsis
class JsonModel
extends ViewModel
{
- // members
- protected string $captureTo;
- protected string $jsonpCallback;
- protected bool $terminate;
- // Inherited members from ViewModel
- protected string $captureTo;
- protected array $children;
- protected array $options;
- protected string $template;
- protected bool $terminate;
- protected array|ArrayAccess&Traversable $variables;
- protected bool $append;
- // methods
- public JsonModel setJsonpCallback()
- public string serialize()
- // Inherited methods from ViewModel
- public void __construct()
- public void __set()
- public mixed __get()
- public bool __isset()
- public void __unset()
- public ViewModel setOption()
- public mixed getOption()
- public ViewModel setOptions()
- public array getOptions()
- public ViewModel clearOptions()
- public mixed getVariable()
- public ViewModel setVariable()
- public ViewModel setVariables()
- public array|ArrayAccess|Traversable getVariables()
- public ViewModel clearVariables()
- public ViewModel setTemplate()
- public string getTemplate()
- public ViewModel addChild()
- public array getChildren()
- public bool hasChildren()
- public ViewModel clearChildren()
- public array getChildrenByCaptureTo()
- public ViewModel setCaptureTo()
- public string captureTo()
- public ViewModel setTerminal()
- public bool terminate()
- public ViewModel setAppend()
- public bool isAppend()
- public int count()
- public ArrayIterator getIterator()
Hierarchy
Extends
Members
protected
- $append
—
Zend\View\Model\bool
Is this append to child with the same capture? - $captureTo
—
string
JSON probably won't need to be captured into a a parent container by default. - $captureTo
—
string
What variable a parent model should capture this model to - $children
—
array
Child models - $jsonpCallback
—
string
JSONP callback (if set, wraps the return in a function call) - $options
—
array
Renderer options - $template
—
string
Template to use when rendering this model - $terminate
—
Zend\View\Model\bool
JSON is usually terminal - $terminate
—
Zend\View\Model\bool
Is this a standalone, or terminal, model? - $variables
—
Zend\View\Model\array|ArrayAccess&Traversable
View variables
Methods
public
- serialize() — Serialize to JSON
- setJsonpCallback() — Set the JSONP callback function name
Inherited from Zend\View\Model\ViewModel
public
- __get() — Property overloading: get variable value
- __isset() — Property overloading: do we have the requested variable value?
- __set() — Property overloading: set variable value
- __unset() — Property overloading: unset the requested variable
- addChild() — Add a child model
- captureTo() — Get the name of the variable to which to capture this model
- clearChildren() — Clears out all child models
- clearOptions() — Clear any existing renderer options/hints
- clearVariables() — Clear all variables
- count() — Return count of children
- getChildren() — Return all children.
- getChildrenByCaptureTo() — Returns an array of Viewmodels with captureTo value $capture
- getIterator() — Get iterator of children
- getOption() — Get a single option
- getOptions() — Get renderer options/hints
- getTemplate() — Get the template to be used by this model
- getVariable() — Get a single view variable
- getVariables() — Get view variables
- hasChildren() — Does the model have any children?
- isAppend() — Is this append to child with the same capture?
- setAppend() — Set flag indicating whether or not append to child with the same capture
- setCaptureTo() — Set the name of the variable to capture this model to, if it is a child model
- setOption() — Set a single option
- setOptions() — Set renderer options/hints en masse
- setTemplate() — Set the template to be used by this model
- setTerminal() — Set flag indicating whether or not this is considered a terminal or standalone model
- setVariable() — Set view variable
- setVariables() — Set view variables en masse
- terminate() — Is this considered a terminal or standalone model?