class AbstractNormalizer extends SerializerAwareNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface

Normalizer implementation.

Traits

SerializerAware trait.

Constants

CIRCULAR_REFERENCE_LIMIT

OBJECT_TO_POPULATE

GROUPS

Methods

setSerializer(SerializerInterface $serializer)

Sets the serializer.

__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.

Details

in SerializerAwareTrait at line line 31
setSerializer(SerializerInterface $serializer)

Sets the serializer.

Parameters

SerializerInterface $serializer A SerializerInterface instance

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

Sets the {@link ClassMetadataFactoryInterface} to use.

Parameters

ClassMetadataFactoryInterface $classMetadataFactory
NameConverterInterface $nameConverter

at line line 88
AbstractNormalizer setCircularReferenceLimit(int $circularReferenceLimit)

Set circular reference limit.

Parameters

int $circularReferenceLimit limit of iterations for the same object

Return Value

AbstractNormalizer

at line line 102
AbstractNormalizer setCircularReferenceHandler(callable $circularReferenceHandler)

Set circular reference handler.

Parameters

callable $circularReferenceHandler

Return Value

AbstractNormalizer

at line line 118
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 140
AbstractNormalizer setIgnoredAttributes(array $ignoredAttributes)

Set ignored attributes for normalization and denormalization.

Parameters

array $ignoredAttributes

Return Value

AbstractNormalizer