Documentation

NormalizableInterface

Defines the most basic interface a class must implement to be normalizable.

If a normalizer is registered for the class and it doesn't implement the Normalizable interfaces, the normalizer will be used instead.

Tags
author

Jordi Boggiano j.boggiano@seld.be

Table of Contents

Methods

normalize()  : array<string|int, mixed>|string|int|float|bool
Normalizes the object into an array of scalars|arrays.

Methods

normalize()

Normalizes the object into an array of scalars|arrays.

public normalize(NormalizerInterface $normalizer[, string|null $format = null ][, array<string|int, mixed> $context = [] ]) : array<string|int, mixed>|string|int|float|bool

It is important to understand that the normalize() call should normalize recursively all child objects of the implementor.

Parameters
$normalizer : NormalizerInterface

The normalizer is given so that you can use it to normalize objects contained within this object

$format : string|null = null

The format is optionally given to be able to normalize differently based on different output formats

$context : array<string|int, mixed> = []

Options for normalizing this object

Return values
array<string|int, mixed>|string|int|float|bool

        
On this page

Search results