|
@@ 91-94 (lines=4) @@
|
| 88 |
|
} |
| 89 |
|
} |
| 90 |
|
|
| 91 |
|
if ($data instanceof ResourceInterface) { |
| 92 |
|
$event = new AfterNormalizationEvent($data, $normalized, (string) $format, $context); |
| 93 |
|
$this->eventDispatcher->dispatch(SerializationEvents::AFTER_NORMALIZATION, $event); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
return $normalized; |
| 97 |
|
} |
|
@@ 104-107 (lines=4) @@
|
| 101 |
|
*/ |
| 102 |
|
public function denormalize($data, $type, $format = null, array $context = []) |
| 103 |
|
{ |
| 104 |
|
if (\is_a($type, ResourceInterface::class, true)) { |
| 105 |
|
$event = new BeforeDenormalizationEvent($data, $type, $format, $context); |
| 106 |
|
$this->eventDispatcher->dispatch(SerializationEvents::BEFORE_DENORMALIZATION, $event); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
$countDenormalizers = 0; |
| 110 |
|
|
|
@@ 133-136 (lines=4) @@
|
| 130 |
|
} |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
if (\is_a($type, ResourceInterface::class, true)) { |
| 134 |
|
$event = new AfterDenormalizationEvent($data, $denormalized, (string) $format, $context); |
| 135 |
|
$this->eventDispatcher->dispatch(SerializationEvents::AFTER_DENORMALIZATION, $event); |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
return $denormalized; |
| 139 |
|
} |