1 | <?php |
||
12 | trait ExtensionTrait |
||
13 | { |
||
14 | /** |
||
15 | * Returns the reflected property. |
||
16 | * |
||
17 | * @param object|string $object |
||
18 | * @param string $name |
||
19 | * @return \ReflectionProperty |
||
20 | */ |
||
21 | protected function getProperty($object, $name) |
||
29 | |||
30 | /** |
||
31 | * Returns the private/protected property by its name. |
||
32 | * |
||
33 | * @param object|string $object |
||
34 | * @param string $name |
||
35 | * @return mixed |
||
36 | */ |
||
37 | protected function getInaccessibleProperty($object, $name) |
||
43 | |||
44 | /** |
||
45 | * Sets the private/protected property value by its name. |
||
46 | * |
||
47 | * @param object|string $object |
||
48 | * @param string $name |
||
49 | * @param mixed $value |
||
50 | */ |
||
51 | protected function setInaccessibleProperty($object, $name, $value) |
||
57 | |||
58 | /** |
||
59 | * Invokes the private/protected method by its name and returns its result. |
||
60 | * |
||
61 | * @param object|string $object |
||
62 | * @param string $name |
||
63 | * @param array $args |
||
64 | * @return mixed |
||
65 | */ |
||
66 | protected function invokeInaccessibleMethod($object, $name, array $args = []) |
||
72 | } |
||
73 |