class ArrayDenormalizer implementsDenormalizerInterface,DenormalizerAwareInterface

Denormalizes arrays of objects.

Traits

DenormalizerAwareTrait

Methods

void
setDenormalizer(DenormalizerInterface$denormalizer)

Sets the owning Denormalizer object.

array
getSupportedTypes(string|null$format)

Returns the types potentially supported by this denormalizer.

mixed
denormalize(mixed$data,string$type,string$format =null,array$context =[])

No description

bool
supportsDenormalization(mixed$data,string$type,string$format =null,array$context =[])

Checks whether the given class is supported for denormalization by this normalizer.

Details

void setDenormalizer(DenormalizerInterface$denormalizer)

Sets the owning Denormalizer object.

Parameters

DenormalizerInterface $denormalizer

Return Value

void

array getSupportedTypes(string|null$format)

Returns the types potentially supported by this denormalizer.

For each supported formats (if applicable), the supported types should be returned as keys, and each type should be mapped to a boolean indicating if the result of supportsDenormalization() can be cached or not (a result cannot be cached when it depends on the context or on the data.) A null value means that the denormalizer does not support the corresponding type.

Use type "object" to match any classes or interfaces, and type "*" to match any types.

Parameters

string|null $format

Return Value

array bool|null>

mixed denormalize(mixed$data,string$type,string$format =null,array$context =[])

Parameters

mixed $data Data to restore
string $type The expected class to instantiate
string $format Format the given data was extracted from
array $context Options available to the denormalizer

Return Value

mixed

Exceptions

NotNormalizableValueException

bool supportsDenormalization(mixed$data,string$type,string$format =null,array$context =[])

Checks whether the given class is supported for denormalization by this normalizer.

Parameters

mixed $data
string $type
string $format
array $context

Return Value

bool