SimpleListenerProvider
in package
implements
ListenerProviderInterface
Uses
ParameterDeriverTrait
Simple ListenerProvider
A basic container of Listeners All listeners are returned that match any of the event's interfaces
Tags
Interfaces, Classes and Traits
- ListenerProviderInterface
Table of Contents
- $listeners : array<string|int, mixed>
- addListener() : void
- Add a listener to the stack of candidates
- getListenersForEvent() : iteratable<string|int, callable>
- Filter the list of relevant listeners for this event
Properties
$listeners
private
array<string|int, mixed>
$listeners
= []
Methods
addListener()
Add a listener to the stack of candidates
public
addListener(callable $listener) : void
Parameters
- $listener : callable
Return values
void —getListenersForEvent()
Filter the list of relevant listeners for this event
public
getListenersForEvent(object $event) : iteratable<string|int, callable>
Parameters
- $event : object
-
An event for which to return the relevant listeners.
Return values
iteratable<string|int, callable> —An iterable (array, iterator, or generator) of callables. Each callable MUST be type-compatible with $event.