class EventWatcher extends Watcher

Traits

Properties

protected Dispatcher $events

The event dispatcher.

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
array
hideParameters(array $data, array $hidden)

Hide the given parameters.

from  Watcher
string
formatClosureListener(Closure $listener)

Format a closure-based listener.

void
recordEvent(string $event, array $payload)

Record an event was fired.

array
extractPayload(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 18
__construct(array $options = [])

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 33
void register(Application $app)

Register the watcher.

Parameters

Application $app

Return Value

void

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

Set the watcher options.

Parameters

array $options

Return Value

Watcher

in Watcher at line 41
protected array hideParameters(array $data, array $hidden)

Hide the given parameters.

Parameters

array $data
array $hidden

Return Value

array

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 43
void recordEvent(string $event, array $payload)

Record an event was fired.

Parameters

string $event
array $payload

Return Value

void

at line 64
protected array extractPayload(string $event, array $payload)

Extract the payload and tags from the event.

Parameters

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 140
protected bool eventIsIgnored(string $eventName)

Determine if the event is ignored manually.

Parameters

string $eventName

Return Value

bool