1 | <?php namespace Knot\Dict; |
||
21 | abstract class AbstractDictBody implements Arrayaccess, Countable, IteratorAggregate, Arrayable { |
||
22 | |||
23 | use ArrayAccessTrait, CountableTrait, IteratorAggregateTrait, PathOperationsTrait; |
||
24 | |||
25 | /** |
||
26 | * Knot data. |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $data; |
||
30 | |||
31 | /** |
||
32 | * @var AbstractDictBody |
||
33 | */ |
||
34 | protected $parentArray; |
||
35 | |||
36 | |||
37 | /** |
||
38 | * @return AbstractDictBody |
||
39 | */ |
||
40 | abstract public function kill(); |
||
41 | |||
42 | |||
43 | /** |
||
44 | * @param array $data |
||
45 | * @param AbstractDictBody $parent |
||
46 | * @param $path |
||
47 | */ |
||
48 | public function __construct(array &$data, AbstractDictBody $parent = null, $path = '') |
||
54 | |||
55 | |||
56 | /** |
||
57 | * @param $key |
||
58 | * @param $value |
||
59 | */ |
||
60 | public function __set($key, $value) |
||
64 | |||
65 | |||
66 | /** |
||
67 | * @param string|int $key |
||
68 | * |
||
69 | * @return mixed|\Knot\Dict\ChildDict |
||
70 | * @throws \Exception |
||
71 | */ |
||
72 | public function &__get($key) |
||
92 | |||
93 | |||
94 | /** |
||
95 | * Call callable data variable. |
||
96 | * |
||
97 | * @param string $methodPath |
||
98 | * @param array $arguments |
||
99 | * |
||
100 | * @return mixed |
||
101 | * @throws \Exception |
||
102 | */ |
||
103 | public function call($methodPath, array $arguments = [ ]) |
||
123 | |||
124 | |||
125 | /** |
||
126 | * Function list: Helper Libraries! |
||
127 | * |
||
128 | * @param string $method |
||
129 | * @param array $arguments |
||
130 | * |
||
131 | * @return $this|mixed |
||
132 | * @throws \Exception|WrongFunctionException |
||
133 | */ |
||
134 | public function __call($method, $arguments = [ ]) |
||
145 | |||
146 | |||
147 | /** |
||
148 | * @param mixed $key |
||
149 | * |
||
150 | * @return bool |
||
151 | */ |
||
152 | public function __isset($key) |
||
156 | |||
157 | |||
158 | /** |
||
159 | * @param mixed $key |
||
160 | */ |
||
161 | public function __unset($key) |
||
165 | |||
166 | |||
167 | /** |
||
168 | * Easy Access for get function! |
||
169 | * |
||
170 | * @param $path |
||
171 | * |
||
172 | * @return mixed |
||
173 | */ |
||
174 | public function __invoke($path) |
||
178 | |||
179 | |||
180 | /** |
||
181 | * Only search own data keys. |
||
182 | * |
||
183 | * @param mixed $key |
||
184 | * |
||
185 | * @return bool |
||
186 | */ |
||
187 | public function keyExists($key) |
||
191 | |||
192 | |||
193 | /** |
||
194 | * @return HelperManager |
||
195 | */ |
||
196 | public function getHelperManager() |
||
200 | |||
201 | |||
202 | /** |
||
203 | * @return int|string |
||
204 | */ |
||
205 | public function lastKey() |
||
211 | |||
212 | |||
213 | /** |
||
214 | * @return array |
||
215 | */ |
||
216 | public function &toArray() |
||
220 | |||
221 | |||
222 | /** |
||
223 | * @return ParentDict |
||
224 | */ |
||
225 | public function copy() |
||
231 | |||
232 | |||
233 | /** |
||
234 | * @return $this |
||
235 | */ |
||
236 | public function childParent() |
||
240 | |||
241 | } |
||
242 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: