ListenerIntrospectionInterface
in
Tells which listeners are registered for an event, and in which order they run.
Table of Contents
Methods
- getListenerPriority() : int|null
- Gets the listener priority for a specific event.
-
getListeners()
: ($eventName is null ? array
> : list ) - Gets the listeners of a specific event or all listeners sorted by descending priority.
- hasListeners() : bool
- Checks whether an event has any registered listeners.
Methods
getListenerPriority()
Gets the listener priority for a specific event.
public
getListenerPriority(string $eventName, callable $listener) : int|null
Returns null if the event or the listener does not exist.
Parameters
- $eventName : string
- $listener : callable
Return values
int|nullgetListeners()
Gets the listeners of a specific event or all listeners sorted by descending priority.
public
getListeners([string|null $eventName = null ]) : ($eventName is null ? array> : list)
Parameters
- $eventName : string|null = null
Return values
($eventName is null ? arrayhasListeners()
Checks whether an event has any registered listeners.
public
hasListeners([string|null $eventName = null ]) : bool
Parameters
- $eventName : string|null = null