NullDispatcher
class NullDispatcher implements Dispatcher (View source)
Traits
ForwardsCalls |
Properties
protected Dispatcher | $dispatcher | The underlying event dispatcher instance. |
Methods
mixed | forwardCallTo(mixed $object, string $method, array $parameters) Forward a method call to the given object. | from ForwardsCalls |
static void | throwBadMethodCallException(string $method) Throw a bad method call exception for the given method. | from ForwardsCalls |
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. | |
array|null | until(string|object $event, mixed $payload = []) Don't dispatch an event. | |
void | listen(string|array $events, Closure|string $listener) 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. |
Details
protected mixed forwardCallTo(mixed $object, string $method, array $parameters)
Forward a method call to the given object.
static protected void 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.
array|null until(string|object $event, mixed $payload = [])
Don't dispatch an event.
void listen(string|array $events, Closure|string $listener)
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/6.x/Illuminate/Events/NullDispatcher.html