-
-
Notifications
You must be signed in to change notification settings - Fork 0
EventSubscriberListenerProvider
github-actions edited this page Apr 6, 2026
·
1 revision
Adapt Symfony event subscribers to a PSR-14 listener provider.
Subscribers are indexed by event name and yielded in descending priority order.
- Full name:
\FastForward\EventDispatcher\ListenerProvider\EventSubscriberListenerProvider - This class is marked as final and can't be subclassed
- This class implements:
ListenerProviderInterface - This class is a Final class
Register the initial event subscribers.
public __construct(\Symfony\Component\EventDispatcher\EventSubscriberInterface|string $eventSubscribers): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$eventSubscribers |
\Symfony\Component\EventDispatcher\EventSubscriberInterface|string | Subscriber instances or subscriber class names. |
Yield listeners for the provided event.
public getListenersForEvent(object $event): iterable<callable>Parameters:
| Parameter | Type | Description |
|---|---|---|
$event |
object | event instance used for listener lookup |
Return Value:
listeners that accept the resolved event instance
Register a subscriber and index its declared listeners.
public addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface|string $eventSubscriber): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$eventSubscriber |
\Symfony\Component\EventDispatcher\EventSubscriberInterface|string | subscriber instance or subscriber class name |
Throws:
thrown when the provided class name is not a Symfony event subscriber