EventFake

EventFake

class EventFake implements Dispatcher (View source)

Methods

void assertFired(string $event, callable|null $callback = null)

Assert if an event was fired based on a truth-test callback.

void assertNotFired(string $event, callable|null $callback = null)

Determine if an event was fired based on a truth-test callback.

Collection fired(string $event, callable|null $callback = null)

Get all of the events matching a truth-test callback.

bool hasFired(string $event)

Determine if the given event has been fired.

void listen(string|array $events, mixed $listener, int $priority)

Register an event listener with the dispatcher.

bool hasListeners(string $eventName)

Determine if a given event has listeners.

void push(string $event, array $payload = array())

Register an event and payload to be fired later.

void subscribe(object|string $subscriber)

Register an event subscriber with the dispatcher.

mixed until(string $event, array $payload = array())

Fire an event until the first non-null response is returned.

void flush(string $event)

Flush a set of pushed events.

array|null fire(string|object $event, mixed $payload = array(), bool $halt = false)

Fire an event and call the listeners.

string firing()

Get the event that is currently firing.

void forget(string $event)

Remove a set of listeners from the dispatcher.

void forgetPushed()

Forget all of the queued listeners.

doc_Laravel
2016-11-02 16:17:17
Comments
Leave a Comment

Please login to continue.