Dispatcher
interface Dispatcher
Methods
Register an event listener with the dispatcher.
Determine if a given event has listeners.
Register an event subscriber with the dispatcher.
Dispatch an event until the first non-null response is returned.
Dispatch an event and call the listeners.
Register an event and payload to be fired later.
Flush a set of pushed events.
Remove a set of listeners from the dispatcher.
Forget all of the queued listeners.
Details
at line 14
void
listen(string|array $events, mixed $listener)
Register an event listener with the dispatcher.
at line 22
bool
hasListeners(string $eventName)
Determine if a given event has listeners.
at line 30
void
subscribe(object|string $subscriber)
Register an event subscriber with the dispatcher.
at line 39
array|null
until(string|object $event, mixed $payload = [])
Dispatch an event until the first non-null response is returned.
at line 49
array|null
dispatch(string|object $event, mixed $payload = [], bool $halt = false)
Dispatch an event and call the listeners.
at line 58
void
push(string $event, array $payload = [])
Register an event and payload to be fired later.
at line 66
void
flush(string $event)
Flush a set of pushed events.
at line 74
void
forget(string $event)
Remove a set of listeners from the dispatcher.
at line 81
void
forgetPushed()
Forget all of the queued listeners.