RegisterEventListenersAndSubscribersPass
in package
implements
CompilerPassInterface
Registers event listeners and subscribers to the available doctrine connections.
Tags
Interfaces, Classes, Traits and Enums
- CompilerPassInterface
- Interface that must be implemented by compilation passes.
Table of Contents
- $connections : mixed
- $eventManagers : mixed
- $managerTemplate : mixed
- $tagPrefix : mixed
- __construct() : mixed
- process() : mixed
- You can modify the container here before it is dumped to PHP code.
- addTaggedListeners() : mixed
- addTaggedSubscribers() : mixed
- findAndSortTags() : array<string|int, mixed>
- Finds and orders all service tags with the given name by their priority.
- getEventManagerDef() : mixed
Properties
$connections
private
mixed
$connections
$eventManagers
private
mixed
$eventManagers
$managerTemplate
private
mixed
$managerTemplate
$tagPrefix
private
mixed
$tagPrefix
Methods
__construct()
public
__construct(string $connections, string $managerTemplate, string $tagPrefix) : mixed
Parameters
- $connections : string
-
Parameter ID for connections
- $managerTemplate : string
-
sprintf() template for generating the event manager's service ID for a connection name
- $tagPrefix : string
-
Tag prefix for listeners and subscribers
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 —addTaggedListeners()
private
addTaggedListeners(ContainerBuilder $container, array<string|int, mixed> &$listenerRefs) : mixed
Parameters
- $container : ContainerBuilder
- $listenerRefs : array<string|int, mixed>
Return values
mixed —addTaggedSubscribers()
private
addTaggedSubscribers(ContainerBuilder $container, array<string|int, mixed> &$listenerRefs) : mixed
Parameters
- $container : ContainerBuilder
- $listenerRefs : array<string|int, mixed>
Return values
mixed —findAndSortTags()
Finds and orders all service tags with the given name by their priority.
private
findAndSortTags(string $tagName, ContainerBuilder $container) : array<string|int, mixed>
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 this class.
Parameters
- $tagName : string
- $container : ContainerBuilder
Tags
Return values
array<string|int, mixed> —getEventManagerDef()
private
getEventManagerDef(ContainerBuilder $container, string $name) : mixed
Parameters
- $container : ContainerBuilder
- $name : string