SerializerAwareTrait

trait SerializerAwareTrait SerializerAware trait. Methods setSerializer(SerializerInterface $serializer) Sets the serializer. Details setSerializer(SerializerInterface $serializer) Sets the serializer. Parameters SerializerInterface $serializer A SerializerInterface instance

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

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::supportsEncoding()

bool supportsEncoding(string $format) Checks whether the serializer can encode to 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

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::supportsDecoding()

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

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::denormalize()

object denormalize(mixed $data, $type, string $format = null, array $context = array()) Denormalizes data back into an object of the given class. Parameters mixed $data data to restore $type string $format format the given data was extracted from array $context options available to the denormalizer Return Value object

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