SerializerAwareNormalizer deprecated

class SerializerAwareNormalizer implements SerializerAwareInterface deprecated since version 3.1, to be removed in 4.0. Use the SerializerAwareTrait instead. SerializerAware Normalizer implementation. Traits SerializerAwareTrait SerializerAware trait. Methods setSerializer(SerializerInterface $serializer) Sets the serializer. from SerializerAwareTrait Details setSerializer(SerializerInterface $serializer) Sets the serializer. Parame

SerializerAwareInterface

interface SerializerAwareInterface Defines the interface of encoders. Methods setSerializer(SerializerInterface $serializer) Sets the owning Serializer object. Details setSerializer(SerializerInterface $serializer) Sets the owning Serializer object. Parameters SerializerInterface $serializer

SerializerAwareEncoder

class SerializerAwareEncoder implements SerializerAwareInterface SerializerAware Encoder implementation. Methods setSerializer(SerializerInterface $serializer) Sets the owning Serializer object. Details setSerializer(SerializerInterface $serializer) Sets the owning Serializer object. Parameters SerializerInterface $serializer

Serializer::supportsNormalization()

bool supportsNormalization(mixed $data, string $format = null) Checks whether the given class is supported for normalization by this normalizer. Parameters mixed $data Data to normalize. string $format The format being (de-)serialized from or into. Return Value bool

Serializer::supportsEncoding()

bool supportsEncoding(string $format) Checks whether the serializer can encode to given format. Parameters string $format format name Return Value bool

Serializer::supportsDenormalization()

bool supportsDenormalization(mixed $data, string $type, string $format = null) Checks whether the given class is supported for denormalization by this normalizer. Parameters mixed $data Data to denormalize from. string $type The class to which the data should be denormalized. string $format The format being deserialized from. Return Value bool

Serializer::supportsDecoding()

bool supportsDecoding(string $format) Checks whether the deserializer can decode from given format. Parameters string $format format name Return Value bool

Serializer::serialize()

final string serialize(mixed $data, string $format, array $context = array()) Serializes data in the appropriate format. Parameters mixed $data any data string $format format name array $context options normalizers/encoders have access to Return Value string

Serializer::normalize()

array|string|bool|int|float|null normalize($data, string $format = null, array $context = array()) Normalizes an object into a set of arrays/scalars. Parameters $data string $format format the normalization result will be encoded as array $context Context options for the normalizer Return Value array|string|bool|int|float|null

Serializer::encode()

final scalar encode(mixed $data, string $format, array $context = array()) Encodes data into the given format. Parameters mixed $data Data to encode string $format Format name array $context options that normalizers/encoders have access to. Return Value scalar Exceptions UnexpectedValueException