ContextAwareDenormalizerInterface
extends
DenormalizerInterface
in
Adds the support of an extra $context parameter for the supportsDenormalization method.
Tags
Table of Contents
Constants
- COLLECT_DENORMALIZATION_ERRORS = 'collect_denormalization_errors'
Methods
- denormalize() : 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.
Constants
COLLECT_DENORMALIZATION_ERRORS
public
mixed
COLLECT_DENORMALIZATION_ERRORS
= 'collect_denormalization_errors'
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 = [] ]) : 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
supportsDenormalization()
Checks whether the given class is supported for denormalization by this normalizer.
public
supportsDenormalization(mixed $data, string $type[, string $format = null ][, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $data : mixed
-
Data to denormalize from
- $type : string
-
The class to which the data should be denormalized
- $format : string = null
-
The format being deserialized from
- $context : array<string|int, mixed> = []
-
options that denormalizers have access to