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