1 | <?php |
||
54 | trait ApparatObjectTrait |
||
55 | { |
||
56 | /** |
||
57 | * Property mapping |
||
58 | * |
||
59 | * @var array |
||
60 | */ |
||
61 | protected $mapping = []; |
||
62 | |||
63 | /** |
||
64 | * Generic getter |
||
65 | * |
||
66 | * @param string $method Method name |
||
67 | * @param array $arguments Arguments |
||
68 | * @throws \BadMethodCallException If the method is unknown |
||
69 | */ |
||
70 | 2 | public function __call($method, array $arguments) |
|
85 | |||
86 | /** |
||
87 | * Delegate the mapped object getter |
||
88 | * |
||
89 | * @param string $property Property name |
||
90 | * @param string $getter Getter name |
||
91 | * @param array $arguments Getter arguments |
||
92 | * @return mixed Property value |
||
93 | * @throws InvalidArgumentException If the property is invalid |
||
94 | */ |
||
95 | 2 | protected function delegateObjectGetter($property, $getter, array $arguments) |
|
110 | |||
111 | /** |
||
112 | * Return whether a particular property exists |
||
113 | * |
||
114 | * @param string $offset Property name |
||
115 | */ |
||
116 | 1 | public function offsetExists($offset) |
|
120 | |||
121 | /** |
||
122 | * Return a particular property |
||
123 | * |
||
124 | * @param string $offset Property name |
||
125 | * @return mixed Property value |
||
126 | * @throws InvalidArgumentException If the requested property is invalid |
||
127 | */ |
||
128 | 2 | public function offsetGet($offset) |
|
143 | |||
144 | /** |
||
145 | * Set a particular property |
||
146 | * |
||
147 | * @param string $offset Property name |
||
148 | * @param mixed $value Property value |
||
149 | * @throws InvalidArgumentException |
||
150 | */ |
||
151 | 1 | public function offsetSet($offset, $value) |
|
158 | |||
159 | /** |
||
160 | * Unset a particular property |
||
161 | * |
||
162 | * @param string $offset Property name |
||
163 | * @throws InvalidArgumentException |
||
164 | */ |
||
165 | 1 | public function offsetUnset($offset) |
|
172 | |||
173 | /** |
||
174 | * Append a value |
||
175 | * |
||
176 | * @param mixed $value Value |
||
177 | * @throws InvalidArgumentException |
||
178 | */ |
||
179 | public function append($value) |
||
186 | |||
187 | /** |
||
188 | * Return an array copy of all object properties |
||
189 | * |
||
190 | * @return array Object properties |
||
191 | */ |
||
192 | public function getArrayCopy() |
||
205 | |||
206 | /** |
||
207 | * Return the number of object properties |
||
208 | * |
||
209 | * @return int Number of object properties |
||
210 | */ |
||
211 | public function count() |
||
215 | |||
216 | /** |
||
217 | * Sort the object properties by value |
||
218 | * |
||
219 | * @return void |
||
220 | */ |
||
221 | public function asort() |
||
225 | |||
226 | /** |
||
227 | * Sort the entries by key |
||
228 | * @link http://php.net/manual/en/arrayobject.ksort.php |
||
229 | * @return void |
||
230 | * @since 5.2.0 |
||
231 | */ |
||
232 | /** |
||
233 | * Sort the object properties by key |
||
234 | * |
||
235 | * @return void |
||
236 | */ |
||
237 | public function ksort() |
||
241 | |||
242 | /** |
||
243 | * Sort the object properties by user function |
||
244 | * |
||
245 | * @param \Callable $compareFunction User function |
||
246 | * @return void |
||
247 | */ |
||
248 | public function uasort($compareFunction) |
||
252 | |||
253 | /** |
||
254 | * Sort the object properties by name and user function |
||
255 | * |
||
256 | * @param \Callable $compareFunction User function |
||
257 | * @return void |
||
258 | */ |
||
259 | public function uksort($cmp_function) |
||
263 | |||
264 | /** |
||
265 | * Sort the object properties using a "natural order" algorithm |
||
266 | * |
||
267 | * @return void |
||
268 | */ |
||
269 | public function natsort() |
||
273 | |||
274 | /** |
||
275 | * Sort the object properties using a case insensitive "natural order" algorithm |
||
276 | * |
||
277 | * @return void |
||
278 | */ |
||
279 | public function natcasesort() |
||
283 | |||
284 | /** |
||
285 | * Unserialize the apparat object |
||
286 | * |
||
287 | * @param string $serialized Serialized apparat object |
||
288 | * @return AbstractApparatObject Unserialized apparat object |
||
289 | */ |
||
290 | public function unserialize($serialized) |
||
294 | |||
295 | /** |
||
296 | * Serialize the apparat object |
||
297 | * |
||
298 | * @return AbstractApparatObject Serialized apparat object |
||
299 | */ |
||
300 | public function serialize() |
||
305 | |||
306 | /** |
||
307 | * Exchange the associated object |
||
308 | * |
||
309 | * @param mixed $object Object |
||
310 | * @return ObjectInterface Former object |
||
311 | */ |
||
312 | public function exchangeArray($object) |
||
326 | |||
327 | /** |
||
328 | * Create and return a new object iterator instance |
||
329 | * |
||
330 | * @return ApparatObjectIterator Object iterator instance |
||
331 | */ |
||
332 | public function getIterator() |
||
336 | } |
||
337 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.