class EventWatcher extends Watcher

Traits

Methods

__construct(array $options = [])

Create a new watcher instance.

from  Watcher
void
register(Application $app)

Register the watcher.

setOptions(array $options)

Set the watcher options.

from  Watcher
string
formatClosureListener(Closure $listener)

Format a closure-based listener.

void
recordEvent(string $event, array $payload)

Record an event was fired.

array
extractPayload(object|string $event, array $payload)

Extract the payload and tags from the event.

array
formatListeners(string $eventName)

Format list of event listeners.

bool
shouldIgnore(string $eventName)

Determine if the event should be ignored.

bool
eventIsFiredByTheFramework(string $eventName)

Determine if the event was fired internally by the framework.

bool
eventIsIgnored(string $eventName)

Determine if the event is ignored manually.

Details

in Watcher at line 16
__construct(array $options = [])

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 27
void register(Application $app)

Register the watcher.

Parameters

Application $app

Return Value

void

in Watcher at line 29
Watcher setOptions(array $options)

Set the watcher options.

Parameters

array $options

Return Value

Watcher

in FormatsClosure at line 18
protected string formatClosureListener(Closure $listener)

Format a closure-based listener.

Parameters

Closure $listener

Return Value

string

Exceptions

ReflectionException

at line 36
void recordEvent(string $event, array $payload)

Record an event was fired.

Parameters

string $event
array $payload

Return Value

void

at line 58
protected array extractPayload(object|string $event, array $payload)

Extract the payload and tags from the event.

Parameters

object|string $event
array $payload

Return Value

array

at line 82
protected array formatListeners(string $eventName)

Format list of event listeners.

Parameters

string $eventName

Return Value

array

at line 121
protected bool shouldIgnore(string $eventName)

Determine if the event should be ignored.

Parameters

string $eventName

Return Value

bool

at line 130
protected bool eventIsFiredByTheFramework(string $eventName)

Determine if the event was fired internally by the framework.

Parameters

string $eventName

Return Value

bool

at line 152
protected bool eventIsIgnored(string $eventName)

Determine if the event is ignored manually.

Parameters

string $eventName

Return Value

bool