Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / View / Model / ModelInterface.php
blob804fdbc34441da1fa57d02adabf76c8dc0681916
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\View\Model;
12 use Countable;
13 use IteratorAggregate;
15 /**
16 * Interface describing a view model.
18 * Extends "Countable"; count() should return the number of children attached
19 * to the model.
21 * Extends "IteratorAggregate"; should allow iterating over children.
23 interface ModelInterface extends Countable, IteratorAggregate
25 /**
26 * Set renderer option/hint
28 * @param string $name
29 * @param mixed $value
30 * @return ModelInterface
32 public function setOption($name, $value);
34 /**
35 * Set renderer options/hints en masse
37 * @param array|\Traversable $options
38 * @return ModelInterface
40 public function setOptions($options);
42 /**
43 * Get renderer options/hints
45 * @return array|\Traversable
47 public function getOptions();
49 /**
50 * Get a single view variable
52 * @param string $name
53 * @param mixed|null $default (optional) default value if the variable is not present.
54 * @return mixed
56 public function getVariable($name, $default = null);
58 /**
59 * Set view variable
61 * @param string $name
62 * @param mixed $value
63 * @return ModelInterface
65 public function setVariable($name, $value);
67 /**
68 * Set view variables en masse
70 * @param array|\ArrayAccess $variables
71 * @return ModelInterface
73 public function setVariables($variables);
75 /**
76 * Get view variables
78 * @return array|\ArrayAccess
80 public function getVariables();
82 /**
83 * Set the template to be used by this model
85 * @param string $template
86 * @return ModelInterface
88 public function setTemplate($template);
90 /**
91 * Get the template to be used by this model
93 * @return string
95 public function getTemplate();
97 /**
98 * Add a child model
100 * @param ModelInterface $child
101 * @param null|string $captureTo Optional; if specified, the "capture to" value to set on the child
102 * @param null|bool $append Optional; if specified, append to child with the same capture
103 * @return ModelInterface
105 public function addChild(ModelInterface $child, $captureTo = null, $append = false);
108 * Return all children.
110 * Return specifies an array, but may be any iterable object.
112 * @return array
114 public function getChildren();
117 * Does the model have any children?
119 * @return bool
121 public function hasChildren();
124 * Set the name of the variable to capture this model to, if it is a child model
126 * @param string $capture
127 * @return ModelInterface
129 public function setCaptureTo($capture);
132 * Get the name of the variable to which to capture this model
134 * @return string
136 public function captureTo();
139 * Set flag indicating whether or not this is considered a terminal or standalone model
141 * @param bool $terminate
142 * @return ModelInterface
144 public function setTerminal($terminate);
147 * Is this considered a terminal or standalone model?
149 * @return bool
151 public function terminate();
155 * Set flag indicating whether or not append to child with the same capture
157 * @param bool $append
158 * @return ModelInterface
160 public function setAppend($append);
163 * Is this append to child with the same capture?
165 * @return bool
167 public function isAppend();