serializer = $serializer; $this->denormalizer = $denormalizer; } /** * {@inheritdoc } */ public function deserialize(string $data, string $type,string $format = 'json'): object { return $this->serializer->deserialize($data, $type, $format, $this->context); } /** * {@inheritdoc } */ public function arrayToObject(array $data, string $type, string $format = null): object { return $this->denormalizer->denormalize($data, $type, $format, $this->context); } /** * @param array $context */ public function setContext(array $context): void { $this->context = $context; } }