Methods |
public
|
listen(Closure|string|array $events, Closure|string|array|null $listener = null): void
Register an event listener with the dispatcher.
Register an event listener with the dispatcher.
|
#
|
public
|
hasListeners(string $eventName): bool
Determine if a given event has listeners.
Determine if a given event has listeners.
|
#
|
public
|
subscribe(object|string $subscriber): void
Register an event subscriber with the dispatcher.
Register an event subscriber with the dispatcher.
|
#
|
public
|
until(string|object $event, mixed $payload = []): array|null
Dispatch an event until the first non-null response is returned.
Dispatch an event until the first non-null response is returned.
|
#
|
public
|
dispatch(string|object $event, mixed $payload = [], bool $halt = false): array|null
Dispatch an event and call the listeners.
Dispatch an event and call the listeners.
|
#
|
public
|
push(string $event, array $payload = []): void
Register an event and payload to be fired later.
Register an event and payload to be fired later.
|
#
|
public
|
flush(string $event): void
Flush a set of pushed events.
Flush a set of pushed events.
|
#
|
public
|
forget(string $event): void
Remove a set of listeners from the dispatcher.
Remove a set of listeners from the dispatcher.
|
#
|
public
|
forgetPushed(): void
Forget all of the queued listeners.
Forget all of the queued listeners.
|
#
|