1 | <?php |
||
15 | final class Denormalizer implements DenormalizerInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var DenormalizerObjectMappingRegistryInterface |
||
19 | */ |
||
20 | private $denormalizerObjectMappingRegistry; |
||
21 | |||
22 | /** |
||
23 | * @var LoggerInterface |
||
24 | */ |
||
25 | private $logger; |
||
26 | |||
27 | /** |
||
28 | * @param DenormalizerObjectMappingRegistryInterface $denormalizerObjectMappingRegistry |
||
29 | * @param LoggerInterface|null $logger |
||
30 | */ |
||
31 | 14 | public function __construct( |
|
38 | |||
39 | /** |
||
40 | * @param object|string $object |
||
41 | * @param array $data |
||
42 | * @param DenormalizerContextInterface|null $context |
||
43 | * @param string $path |
||
44 | * |
||
45 | * @return object |
||
46 | * |
||
47 | * @throws DeserializerLogicException |
||
48 | * @throws DeserializerRuntimeException |
||
49 | */ |
||
50 | 14 | public function denormalize($object, array $data, DenormalizerContextInterface $context = null, string $path = '') |
|
100 | |||
101 | /** |
||
102 | * @param string $class |
||
103 | * |
||
104 | * @return DenormalizationObjectMappingInterface |
||
105 | * |
||
106 | * @throws DeserializerLogicException |
||
107 | */ |
||
108 | 14 | private function getObjectMapping(string $class): DenormalizationObjectMappingInterface |
|
118 | |||
119 | /** |
||
120 | * @param DenormalizationObjectMappingInterface $objectMapping |
||
121 | * @param string $path |
||
122 | * @param string|null $type |
||
123 | * |
||
124 | * @return object |
||
125 | */ |
||
126 | 10 | private function createNewObject( |
|
144 | |||
145 | /** |
||
146 | * @param DenormalizerContextInterface $context |
||
147 | * @param DenormalizationFieldMappingInterface $denormalizationFieldMapping |
||
148 | * @param string $path |
||
149 | * @param array $data |
||
150 | * @param object $object |
||
151 | */ |
||
152 | 10 | private function denormalizeField( |
|
175 | |||
176 | /** |
||
177 | * @param string $path |
||
178 | * @param array $names |
||
179 | */ |
||
180 | 1 | private function handleNotAllowedAdditionalFields(string $path, array $names) |
|
190 | |||
191 | /** |
||
192 | * @param DenormalizerContextInterface $context |
||
193 | * @param DenormalizationFieldMappingInterface $mapping |
||
194 | * @param object $object |
||
195 | * |
||
196 | * @return bool |
||
197 | */ |
||
198 | 10 | private function isCompliant( |
|
209 | |||
210 | /** |
||
211 | * @param DenormalizerContextInterface $context |
||
212 | * @param DenormalizationFieldMappingInterface $fieldMapping |
||
213 | * |
||
214 | * @return bool |
||
215 | */ |
||
216 | 9 | private function isWithinGroup( |
|
232 | |||
233 | /** |
||
234 | * @param string $path |
||
235 | * @param string $name |
||
236 | * |
||
237 | * @return string |
||
238 | */ |
||
239 | 9 | private function getSubPathByName(string $path, string $name): string |
|
243 | |||
244 | /** |
||
245 | * @param string $path |
||
246 | * @param array $names |
||
247 | * |
||
248 | * @return array |
||
249 | */ |
||
250 | 1 | private function getSubPathsByNames(string $path, array $names): array |
|
259 | |||
260 | /** |
||
261 | * @param DenormalizerContextInterface $context |
||
262 | * @param DenormalizationObjectMappingInterface $objectMapping |
||
263 | * @param object $object |
||
264 | * @param array $missingFields |
||
265 | * @param string $path |
||
266 | * @param string|null $type |
||
267 | */ |
||
268 | 3 | private function resetMissingFields( |
|
289 | } |
||
290 |
This method has been deprecated.