class AbstractNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface

Normalizer implementation.

Constants

CIRCULAR_REFERENCE_LIMIT

OBJECT_TO_POPULATE

GROUPS

Methods

setSerializer(SerializerInterface $serializer)

Sets the owning Serializer object.

__construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null)

Sets the {@link ClassMetadataFactoryInterface} to use.

setCircularReferenceLimit(int $circularReferenceLimit)

Set circular reference limit.

setCircularReferenceHandler(callable $circularReferenceHandler)

Set circular reference handler.

setCallbacks(array $callbacks)

Set normalization callbacks.

setIgnoredAttributes(array $ignoredAttributes)

Set ignored attributes for normalization and denormalization.

setCamelizedAttributes(array $camelizedAttributes) deprecated

Set attributes to be camelized on denormalize.

Details

in SerializerAwareNormalizer at line line 32
setSerializer(SerializerInterface $serializer)

Sets the owning Serializer object.

Parameters

SerializerInterface $serializer

at line line 72
__construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null)

Sets the {@link ClassMetadataFactoryInterface} to use.

Parameters

ClassMetadataFactoryInterface $classMetadataFactory
NameConverterInterface $nameConverter

at line line 85
AbstractNormalizer setCircularReferenceLimit(int $circularReferenceLimit)

Set circular reference limit.

Parameters

int $circularReferenceLimit Limit of iterations for the same object

Return Value

AbstractNormalizer

at line line 101
AbstractNormalizer setCircularReferenceHandler(callable $circularReferenceHandler)

Set circular reference handler.

Parameters

callable $circularReferenceHandler

Return Value

AbstractNormalizer

Exceptions

InvalidArgumentException

at line line 121
AbstractNormalizer setCallbacks(array $callbacks)

Set normalization callbacks.

Parameters

array $callbacks Help normalize the result

Return Value

AbstractNormalizer

Exceptions

InvalidArgumentException if a non-callable callback is set

at line line 138
AbstractNormalizer setIgnoredAttributes(array $ignoredAttributes)

Set ignored attributes for normalization and denormalization.

Parameters

array $ignoredAttributes

Return Value

AbstractNormalizer

at line line 156
AbstractNormalizer setCamelizedAttributes(array $camelizedAttributes) deprecated

deprecated Deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.

Set attributes to be camelized on denormalize.

Parameters

array $camelizedAttributes

Return Value

AbstractNormalizer

Exceptions

LogicException