final | |
---|---|
implements |
EventDispatcherInterface, ListenerProviderInterface, Instantiable |
Dispatches events to listeners
Implements PSR-14 (Event Dispatcher) interfaces.
Methods | ||
---|---|---|
public
|
__construct(?ListenerProviderInterface $listenerProvider = null)
|
# |
public
|
listen<TEvent is object>(callable(TEvent): mixed $listener, string[]|string|null $event = null): int
|
# |
public
|
dispatch<TEvent is object>(TEvent $event): TEvent
|
# |
public
|
getListenersForEvent<TEvent is object>(TEvent $event): array<callable(TEvent): mixed>
|
# |
public
|
removeListener(int $id): void
|
# |