ContextAwareDenormalizerInterface
extends
DenormalizerInterface
in
Adds the support of an extra $context parameter for the supportsDenormalization method.
Tags
Table of Contents
- denormalize() : object|array<string|int, mixed>
- Denormalizes data back into an object of the given class.
- supportsDenormalization() : bool
- Checks whether the given class is supported for denormalization by this normalizer.
Methods
denormalize()
Denormalizes data back into an object of the given class.
public
denormalize(mixed $data, string $type[, string $format = null ][, array<string|int, mixed> $context = [] ]) : object|array<string|int, mixed>
Parameters
- $data : mixed
-
Data to restore
- $type : string
-
The expected class to instantiate
- $format : string = null
-
Format the given data was extracted from
- $context : array<string|int, mixed> = []
-
Options available to the denormalizer
Tags
Return values
object|array<string|int, mixed> —supportsDenormalization()
Checks whether the given class is supported for denormalization by this normalizer.
public
supportsDenormalization(mixed $data, mixed $type[, mixed $format = null ][, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $data : mixed
-
Data to denormalize from
- $type : mixed
-
The class to which the data should be denormalized
- $format : mixed = null
-
The format being deserialized from
- $context : array<string|int, mixed> = []
-
options that denormalizers have access to