FormErrorNormalizer
in package
implements
NormalizerInterface, CacheableSupportsMethodInterface
FinalYes
Normalizes invalid Form instances.
Table of Contents
Interfaces
- NormalizerInterface
- CacheableSupportsMethodInterface
- Marker interface for normalizers and denormalizers that use only the type and the format in their supports*() methods.
Constants
Methods
- hasCacheableSupportsMethod() : bool
- normalize() : array<string|int, mixed>|string|int|float|bool|ArrayObject|null
- Normalizes an object into a set of arrays/scalars.
- supportsNormalization() : bool
- Checks whether the given class is supported for normalization by this normalizer.
- convertFormChildrenToArray() : array<string|int, mixed>
- convertFormErrorsToArray() : array<string|int, mixed>
Constants
CODE
public
mixed
CODE
= 'status_code'
TITLE
public
mixed
TITLE
= 'title'
TYPE
public
mixed
TYPE
= 'type'
Methods
hasCacheableSupportsMethod()
public
hasCacheableSupportsMethod() : bool
Return values
boolnormalize()
Normalizes an object into a set of arrays/scalars.
public
normalize(mixed $object[, string $format = null ][, array<string|int, mixed> $context = [] ]) : array<string|int, mixed>|string|int|float|bool|ArrayObject|null
Parameters
- $object : mixed
-
Object to normalize
- $format : string = null
-
Format the normalization result will be encoded as
- $context : array<string|int, mixed> = []
-
Context options for the normalizer
Return values
array<string|int, mixed>|string|int|float|bool|ArrayObject|null —\ArrayObject is used to make sure an empty object is encoded as an object not an array
supportsNormalization()
Checks whether the given class is supported for normalization by this normalizer.
public
supportsNormalization(mixed $data[, string $format = null ]) : bool
Parameters
- $data : mixed
-
Data to normalize
- $format : string = null
-
The format being (de-)serialized from or into
Return values
boolconvertFormChildrenToArray()
private
convertFormChildrenToArray(FormInterface $data) : array<string|int, mixed>
Parameters
- $data : FormInterface
Return values
array<string|int, mixed>convertFormErrorsToArray()
private
convertFormErrorsToArray(FormInterface $data) : array<string|int, mixed>
Parameters
- $data : FormInterface