1 | <?php |
||
7 | trait AccessProtectedTrait |
||
8 | { |
||
9 | /** |
||
10 | * Create closure to call inaccessible method. |
||
11 | * |
||
12 | * @param $instance |
||
13 | * |
||
14 | * @return Closure |
||
15 | */ |
||
16 | 22 | protected function createProtectedCaller($instance) |
|
24 | |||
25 | /** |
||
26 | * Gets inaccessible property. |
||
27 | * |
||
28 | * @param $instance |
||
29 | * @param $property |
||
30 | * |
||
31 | * @return Closure |
||
32 | */ |
||
33 | protected function getProtected($instance, $property) |
||
41 | |||
42 | /** |
||
43 | * Calls inaccessible method. |
||
44 | * |
||
45 | * @param object|Closure $instance |
||
46 | * @param $method |
||
47 | * @param $args |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | 1 | protected function callProtected($instance, $method, $args = []) |
|
59 | } |
||
60 |