1 | <?php |
||
15 | trait ChildMaintainance |
||
16 | { |
||
17 | /** |
||
18 | * child elemnts of the element |
||
19 | * @var array |
||
20 | */ |
||
21 | private $arrChilds = []; |
||
22 | |||
23 | /** |
||
24 | * |
||
25 | * @var array[callable] |
||
26 | */ |
||
27 | protected $arrHooksGainChild = []; |
||
28 | |||
29 | public function addHookGainChild(callable $hook, $idx = null) |
||
36 | |||
37 | /** |
||
38 | * |
||
39 | * @return integer |
||
40 | */ |
||
41 | public function count() |
||
45 | |||
46 | /** |
||
47 | * |
||
48 | * @param mixed $offset |
||
49 | * @return boolean |
||
50 | */ |
||
51 | public function offsetExists($offset) |
||
55 | |||
56 | /** |
||
57 | * |
||
58 | * @param mixed $offset |
||
59 | * @return Interface_\HtmlCode |
||
60 | */ |
||
61 | public function offsetGet($offset) |
||
65 | |||
66 | /** |
||
67 | * |
||
68 | * @param mixed $offset |
||
69 | * @param Interface_\HtmlCode $value |
||
70 | */ |
||
71 | public function offsetSet($offset, $value) |
||
85 | |||
86 | /** |
||
87 | * |
||
88 | * @param type $offset |
||
89 | */ |
||
90 | public function offsetUnset($offset) |
||
94 | |||
95 | /** |
||
96 | * Implements iteration |
||
97 | * |
||
98 | * @return \Traversable |
||
99 | */ |
||
100 | public function getIterator() |
||
104 | |||
105 | /** |
||
106 | * |
||
107 | * @param callable $selectFilter |
||
108 | * @return \Traversable |
||
109 | */ |
||
110 | public function getRecursiveIterator(callable $selectFilter = null) |
||
127 | |||
128 | /** |
||
129 | * |
||
130 | * @param \hemio\html\Interface_\HtmlCode $child |
||
131 | * @return \hemio\html\Interface_\HtmlCode |
||
132 | */ |
||
133 | protected function addChildInternal(\hemio\html\Interface_\HtmlCode $child) |
||
138 | |||
139 | /** |
||
140 | * |
||
141 | * @param \hemio\html\Interface_\HtmlCode $child |
||
142 | * @return \hemio\html\Interface_\HtmlCode |
||
143 | */ |
||
144 | public function addChildBeginning(\hemio\html\Interface_\HtmlCode $child) |
||
149 | |||
150 | /** |
||
151 | * |
||
152 | * @param \hemio\html\Interface_\HtmlCode $child |
||
153 | */ |
||
154 | protected function gainChild(\hemio\html\Interface_\HtmlCode $child) |
||
167 | |||
168 | public function __clone() |
||
174 | |||
175 | public function valid() |
||
179 | |||
180 | public function hasChildren() |
||
184 | |||
185 | public function next() |
||
189 | |||
190 | public function current() |
||
194 | |||
195 | public function getChildren() |
||
199 | |||
200 | public function rewind() |
||
204 | |||
205 | public function key() |
||
209 | |||
210 | /** |
||
211 | * Existence usually ensured via (@link \hemio\html\Interface_\MaintainsChilds) |
||
212 | */ |
||
213 | abstract public function isValidChild(\hemio\html\Interface_\HtmlCode $child); |
||
214 | |||
215 | /** |
||
216 | * Existence usually ensured via (@link \hemio\html\Interface_\MaintainsAppendages) |
||
217 | */ |
||
218 | abstract public function getInheritableAppendages(); |
||
219 | } |
||
220 |