1 | <?php |
||
12 | final class Denormalizer implements DenormalizerInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var DenormalizingObjectMappingInterface[] |
||
16 | */ |
||
17 | private $objectMappings; |
||
18 | |||
19 | /** |
||
20 | * @var LoggerInterface |
||
21 | */ |
||
22 | private $logger; |
||
23 | |||
24 | /** |
||
25 | * @param array $objectMappings |
||
26 | * @param LoggerInterface|null $logger |
||
27 | */ |
||
28 | public function __construct(array $objectMappings, LoggerInterface $logger = null) |
||
37 | |||
38 | /** |
||
39 | * @param DenormalizingObjectMappingInterface $objectMapping |
||
40 | */ |
||
41 | private function addObjectMapping(DenormalizingObjectMappingInterface $objectMapping) |
||
45 | |||
46 | /** |
||
47 | * @param object|string $object |
||
48 | * @param array $data |
||
49 | * @param DenormalizerContextInterface|null $context |
||
50 | * @param string $path |
||
51 | * |
||
52 | * @return object |
||
53 | * |
||
54 | * @throws DenormalizerException |
||
55 | */ |
||
56 | public function denormalize($object, array $data, DenormalizerContextInterface $context = null, string $path = '') |
||
80 | |||
81 | /** |
||
82 | * @param string $class |
||
83 | * |
||
84 | * @return DenormalizingObjectMappingInterface |
||
85 | */ |
||
86 | private function getObjectMapping(string $class): DenormalizingObjectMappingInterface |
||
98 | |||
99 | /** |
||
100 | * @param DenormalizerContextInterface $context |
||
101 | * @param DenormalizingFieldMappingInterface $denormalizingFieldMapping |
||
102 | * @param string $path |
||
103 | * @param array $data |
||
104 | * @param $object |
||
105 | */ |
||
106 | private function denormalizeField( |
||
130 | |||
131 | /** |
||
132 | * @param string $path |
||
133 | * @param $names |
||
134 | */ |
||
135 | private function handleNotAllowedAddtionalFields(string $path, $names) |
||
145 | |||
146 | /** |
||
147 | * @param DenormalizerContextInterface $context |
||
148 | * @param DenormalizingFieldMappingInterface $fieldMapping |
||
149 | * |
||
150 | * @return bool |
||
151 | */ |
||
152 | private function isWithinGroup( |
||
168 | |||
169 | /** |
||
170 | * @param string $path |
||
171 | * @param string $name |
||
172 | * |
||
173 | * @return string |
||
174 | */ |
||
175 | private function getSubPathByName(string $path, string $name): string |
||
179 | |||
180 | /** |
||
181 | * @param string $path |
||
182 | * @param array $names |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | private function getSubPathsByNames(string $path, array $names): array |
||
195 | } |
||
196 |