CustomNormalizer
class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface, CacheableSupportsMethodInterface
Traits
Properties
protected SerializerInterface | $serializer | from SerializerAwareTrait |
Methods
Extract the object_to_populate
field from the context if it exists
and is an instance of the provided $class.
Normalizes an object into a set of arrays/scalars.
Denormalizes data back into an object of the given class.
Checks if the given class implements the NormalizableInterface.
Checks if the given class implements the DenormalizableInterface.
No description
Details
protected object|null
extractObjectToPopulate(string $class, array $context, string $key = null)
Extract the object_to_populate
field from the context if it exists
and is an instance of the provided $class.
array|string|int|float|bool
normalize(mixed $object, string $format = null, array $context = array())
Normalizes an object into a set of arrays/scalars.
object
denormalize(mixed $data, string $class, string $format = null, array $context = array())
Denormalizes data back into an object of the given class.
bool
supportsNormalization(mixed $data, string $format = null)
Checks if the given class implements the NormalizableInterface.