1 | <?php |
||
21 | class Dispatcher extends SymfonyEventDispatcher implements EventDispatcher |
||
22 | { |
||
23 | /** |
||
24 | * ContainerAwareEventDispatcher constructor. |
||
25 | * |
||
26 | * @param array<string, mixed> $listenersMap |
||
27 | */ |
||
28 | public function __construct(array $listenersMap = []) |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function addSubscriber(EventSubscriberInterface $subscriber): void |
||
60 | |||
61 | /** |
||
62 | * Adds an event listener that listens on the specified events. |
||
63 | * |
||
64 | * @param string $eventName |
||
65 | * @param mixed $listener |
||
66 | * @param mixed $priority |
||
|
|||
67 | */ |
||
68 | public function addListener($eventName, $listener, $priority = 0): void |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function dispatch($eventName, SymfonyEvent $event = null): SymfonyEvent |
||
102 | |||
103 | /** |
||
104 | * Dispatch event to registered listeners. |
||
105 | * |
||
106 | * @param EventHandler[] $listeners |
||
107 | * @param EventEnvelope $event |
||
108 | */ |
||
109 | private function dispatchEvent(array $listeners, EventEnvelope $event): void |
||
117 | } |
||
118 |