Dispatcher
class Dispatcher implements Dispatcher (View source)
Methods
Register an event listener with the dispatcher.
Determine if a given event has listeners.
Register an event and payload to be fired later.
Register an event subscriber with the dispatcher.
Fire an event until the first non-null response is returned.
Flush a set of pushed events.
Get the event that is currently firing.
Fire an event and call the listeners.
Get all of the listeners for a given event name.
Register an event listener with the dispatcher.
Create a class based listener using the IoC container.
Remove a set of listeners from the dispatcher.
Forget all of the pushed listeners.
Set the queue resolver implementation.
Details
at line line 64
void
__construct(
Container $container = null)
Create a new event dispatcher instance.
at line line 77
void
listen(
string|array $events,
mixed $listener,
int $priority)
Register an event listener with the dispatcher.
at line line 120
void
push(
string $event,
array $payload = array())
Register an event and payload to be fired later.
at line line 133
void
subscribe(
object|string $subscriber)
Register an event subscriber with the dispatcher.
at line line 162
mixed
until(
string $event,
array $payload = array())
Fire an event until the first non-null response is returned.
at line line 196
array|null
fire(
string|object $event,
mixed $payload = array(),
bool $halt = false)
Fire an event and call the listeners.
at line line 272
array
getListeners(
string $eventName)
Get all of the listeners for a given event name.
at line line 330
mixed
makeListener(
mixed $listener)
Register an event listener with the dispatcher.