1 | <?php |
||
15 | final class Normalizer implements NormalizerInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var NormalizerObjectMappingRegistryInterface |
||
19 | */ |
||
20 | private $normalizerObjectMappingRegistry; |
||
21 | |||
22 | /** |
||
23 | * @var LoggerInterface |
||
24 | */ |
||
25 | private $logger; |
||
26 | |||
27 | /** |
||
28 | * @param NormalizerObjectMappingRegistryInterface $normalizerObjectMappingRegistry |
||
29 | * @param LoggerInterface|null $logger |
||
30 | 6 | */ |
|
31 | public function __construct( |
||
38 | |||
39 | /** |
||
40 | * @param object $object |
||
41 | * @param NormalizerContextInterface|null $context |
||
42 | * @param string $path |
||
43 | * |
||
44 | * @return array |
||
45 | 6 | */ |
|
46 | public function normalize( |
||
82 | |||
83 | /** |
||
84 | * @param object $object |
||
85 | * @param string $path |
||
86 | * |
||
87 | * @throws SerializerLogicException |
||
88 | 6 | */ |
|
89 | private function validateDataType($object, string $path) |
||
99 | |||
100 | /** |
||
101 | * @param string $class |
||
102 | * |
||
103 | * @return NormalizationObjectMappingInterface |
||
104 | * |
||
105 | * @throws SerializerLogicException |
||
106 | 5 | */ |
|
107 | private function getObjectMapping(string $class): NormalizationObjectMappingInterface |
||
117 | |||
118 | /** |
||
119 | * @param NormalizerContextInterface $context |
||
120 | * @param NormalizationFieldMappingInterface[] $normalizationFieldMappings |
||
121 | * @param string $path |
||
122 | * @param object $object |
||
123 | * |
||
124 | * @return array |
||
125 | 4 | */ |
|
126 | private function getFieldsByFieldNormalizationMappings( |
||
155 | |||
156 | /** |
||
157 | * @param NormalizerContextInterface $context |
||
158 | * @param NormalizationLinkMappingInterface[] $normalizationLinkMappings |
||
159 | 4 | * @param string $path |
|
160 | * @param object $object |
||
161 | * |
||
162 | * @return array |
||
163 | */ |
||
164 | private function getLinksByLinkNormalizationMappings( |
||
191 | 4 | ||
192 | 2 | /** |
|
193 | * @param NormalizerContextInterface $context |
||
194 | * @param NormalizationFieldMappingInterface|NormalizationLinkMappingInterface $mapping |
||
195 | 2 | * @param object $object |
|
196 | 2 | * |
|
197 | 2 | * @return bool |
|
198 | */ |
||
199 | private function isCompliant(NormalizerContextInterface $context, $mapping, $object): bool |
||
207 | |||
208 | /** |
||
209 | * @param NormalizerContextInterface $context |
||
210 | 2 | * @param NormalizationFieldMappingInterface|NormalizationLinkMappingInterface $mapping |
|
211 | * |
||
212 | 2 | * @return bool |
|
213 | */ |
||
214 | private function isWithinGroup(NormalizerContextInterface $context, $mapping): bool |
||
237 | |||
238 | /** |
||
239 | * @param string $path |
||
240 | * @param string $name |
||
241 | * |
||
242 | * @return string |
||
243 | */ |
||
244 | private function getSubPathByName(string $path, string $name): string |
||
248 | } |
||
249 |
This method has been deprecated.