class RegisterSerializationClassesCompilerPass implements CompilerPassInterface (View source)

Adds services tagged 'normalizer' and 'encoder' to the Serializer.

Methods

process(ContainerBuilder $container)

Adds services to the Serializer.

bool
normalizerBcSettingIsEnabled(string $key, $config_name)

Returns whether a normalizer BC setting is disabled or not.

array
sort(array $services)

Sorts by priority.

Details

process(ContainerBuilder $container)

Adds services to the Serializer.

Parameters

ContainerBuilder $container

The container to process.

protected bool normalizerBcSettingIsEnabled(string $key, $config_name)

Returns whether a normalizer BC setting is disabled or not.

Parameters

string $key
$config_name

Return Value

bool

protected array sort(array $services)

Sorts by priority.

Order services from highest priority number to lowest (reverse sorting).

Parameters

array $services

A nested array keyed on priority number. For each priority number, the value is an array of Symfony\Component\DependencyInjection\Reference objects, each a reference to a normalizer or encoder service.

Return Value

array

A flattened array of Reference objects from $services, ordered from high to low priority.