SerializerPass
in package
implements
CompilerPassInterface
Uses
PriorityTaggedServiceTrait
Adds all services with the tags "serializer.encoder" and "serializer.normalizer" as encoders and normalizers to the "serializer" service.
Tags
Interfaces, Classes, Traits and Enums
- CompilerPassInterface
- Interface that must be implemented by compilation passes.
Table of Contents
- $encoderTag : mixed
- $normalizerTag : mixed
- $serializerService : mixed
- __construct() : mixed
- process() : mixed
- You can modify the container here before it is dumped to PHP code.
- findAndSortTaggedServices() : array<string|int, Reference>
- Finds all services with the given tag name and order them by their priority.
Properties
$encoderTag
private
mixed
$encoderTag
$normalizerTag
private
mixed
$normalizerTag
$serializerService
private
mixed
$serializerService
Methods
__construct()
public
__construct([string $serializerService = 'serializer' ][, string $normalizerTag = 'serializer.normalizer' ][, string $encoderTag = 'serializer.encoder' ]) : mixed
Parameters
- $serializerService : string = 'serializer'
- $normalizerTag : string = 'serializer.normalizer'
- $encoderTag : string = 'serializer.encoder'
Return values
mixed —process()
You can modify the container here before it is dumped to PHP code.
public
process(ContainerBuilder $container) : mixed
Parameters
- $container : ContainerBuilder
Return values
mixed —findAndSortTaggedServices()
Finds all services with the given tag name and order them by their priority.
private
findAndSortTaggedServices(string|TaggedIteratorArgument $tagName, ContainerBuilder $container) : array<string|int, Reference>
The order of additions must be respected for services having the same priority, and knowing that the \SplPriorityQueue class does not respect the FIFO method, we should not use that class.
Parameters
- $tagName : string|TaggedIteratorArgument
- $container : ContainerBuilder