Normalizer\CustomNormalizer (Component\Serializer)
Symfony\Component\Serializer\Normalizer\CustomNormalizer
class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface
Methods
setSerializer(SerializerInterface $serializer) Sets the owning Serializer object. | from SerializerAwareNormalizer | |
array|string|bool|int|float|null | normalize(object $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. | |
bool | supportsDenormalization(mixed $data, string $type, string $format = null) Checks if the given class implements the NormalizableInterface. |
Details
public setSerializer(SerializerInterface $serializer)
Sets the owning Serializer object.
public array|string|bool|int|float|null normalize(object $object, string $format = null, array $context = array())
Normalizes an object into a set of arrays/scalars.
public object denormalize(mixed $data, string $class, string $format = null, array $context = array())
Denormalizes data back into an object of the given class.
public bool supportsNormalization(mixed $data, string $format = null)
Checks if the given class implements the NormalizableInterface.
public bool supportsDenormalization(mixed $data, string $type, string $format = null)
Checks if the given class implements the NormalizableInterface.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Serializer/Normalizer/CustomNormalizer.html