| 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 | 3 | public function __construct(string $property) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param object $object |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | 3 | public function getValue($object) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @param object $object |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | 3 | private function getClass($object): string |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @param string $class |
||
| 54 | * |
||
| 55 | * @return \ReflectionProperty |
||
| 56 | */ |
||
| 57 | 3 | private function getReflectionProperty(string $class): \ReflectionProperty |
|
| 65 | } |
||
| 66 |