NullDispatcher
class NullDispatcher implements Dispatcher (View source)
Traits
Properties
| protected Dispatcher | $dispatcher | The underlying event dispatcher instance. |
Methods
Forward a method call to the given object.
Forward a method call to the given object, returning $this if the forwarded call returned itself.
Throw a bad method call exception for the given method.
Don't fire an event.
Don't register an event and payload to be fired later.
Don't dispatch an event.
Determine if a given event has listeners.
Register an event subscriber with the dispatcher.
Flush a set of pushed events.
Remove a set of listeners from the dispatcher.
Forget all of the queued listeners.
Dynamically pass method calls to the underlying dispatcher.
Details
protected mixed
forwardCallTo(mixed $object, string $method, array $parameters)
Forward a method call to the given object.
protected mixed
forwardDecoratedCallTo(mixed $object, string $method, array $parameters)
Forward a method call to the given object, returning $this if the forwarded call returned itself.
static protected never
throwBadMethodCallException(string $method)
Throw a bad method call exception for the given method.
void
__construct(Dispatcher $dispatcher)
Create a new event dispatcher instance that does not fire.
array|null
dispatch(string|object $event, mixed $payload = [], bool $halt = false)
Don't fire an event.
void
push(string $event, array $payload = [])
Don't register an event and payload to be fired later.
mixed
until(string|object $event, mixed $payload = [])
Don't dispatch an event.
void
listen(Closure|string|array $events, Closure|string|array|null $listener = null)
Register an event listener with the dispatcher.
bool
hasListeners(string $eventName)
Determine if a given event has listeners.
void
subscribe(object|string $subscriber)
Register an event subscriber with the dispatcher.
void
flush(string $event)
Flush a set of pushed events.
void
forget(string $event)
Remove a set of listeners from the dispatcher.
void
forgetPushed()
Forget all of the queued listeners.
mixed
__call(string $method, array $parameters)
Dynamically pass method calls to the underlying dispatcher.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.