1 | <?php |
||
9 | class EntityMap implements Map |
||
10 | { |
||
11 | /** |
||
12 | * @var mixed |
||
13 | */ |
||
14 | private $entity; |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $data; |
||
20 | |||
21 | /** |
||
22 | * @var \ReflectionClass |
||
23 | */ |
||
24 | protected $reflectionClass; |
||
25 | |||
26 | /** |
||
27 | * @var Factory |
||
28 | */ |
||
29 | protected $mappingFactory; |
||
30 | |||
31 | public function __construct($entity, array $data, $mappingFactory) |
||
38 | |||
39 | public function getMap() |
||
54 | |||
55 | /** |
||
56 | * @param array $data |
||
57 | * @param string $type |
||
58 | * @return mixed |
||
59 | * @throws InvalidAttributeType |
||
60 | */ |
||
61 | protected function getFieldValue(array $data, string $type) |
||
66 | |||
67 | /** |
||
68 | * @param mixed $entity |
||
69 | * @param string $field |
||
70 | * @param mixed $value |
||
71 | * @throws AttributeUnreachable |
||
72 | */ |
||
73 | protected function setEntityValue($entity, string $field, $value) |
||
90 | } |
||
91 |