1 | <?php |
||
10 | final class PropertyAccessor implements AccessorInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $property; |
||
16 | |||
17 | /** |
||
18 | * @param string $property |
||
19 | */ |
||
20 | 6 | public function __construct(string $property) |
|
24 | |||
25 | /** |
||
26 | * @param object $object |
||
27 | * @param mixed $value |
||
28 | */ |
||
29 | 3 | public function setValue($object, $value) |
|
35 | |||
36 | /** |
||
37 | * @param object $object |
||
38 | * |
||
39 | * @return mixed |
||
40 | */ |
||
41 | 4 | public function getValue($object) |
|
48 | |||
49 | /** |
||
50 | * @param object $object |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 6 | private function getClass($object): string |
|
62 | |||
63 | /** |
||
64 | * @param string $class |
||
65 | * |
||
66 | * @return \ReflectionProperty |
||
67 | */ |
||
68 | 6 | private function getReflectionProperty(string $class): \ReflectionProperty |
|
76 | } |
||
77 |