class ReverbWatcher extends Watcher

Properties

protected EntriesRepository|null $entriesRepository

The entries repository.

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
void
recordReverbEvent(string $eventName, object $event)

Record a Reverb event.

array
extractEventData(string $eventName, object $event)

Extract entry content from the event.

array
extractTags(object $event)

Extract tags for the entry.

string
truncateMessage(string $message)

Truncate message content to the configured size limit.

array
eventMap()

Map config event names to Reverb event classes.

array
defaultEvents()

Default events to record.

Details

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

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 23
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

at line 53
protected void recordReverbEvent(string $eventName, object $event)

Record a Reverb event.

Preserves outer recording state because Reverb events can fire inside an already-recording HTTP request or queue job coroutine (e.g. MessageSent during a broadcast triggered by EventsController). Only starts/stops recording when no outer context is active (pure WebSocket coroutines).

Parameters

string $eventName
object $event

Return Value

void

at line 81
protected array extractEventData(string $eventName, object $event)

Extract entry content from the event.

Parameters

string $eventName
object $event

Return Value

array

at line 123
protected array extractTags(object $event)

Extract tags for the entry.

Parameters

object $event

Return Value

array

at line 141
protected string truncateMessage(string $message)

Truncate message content to the configured size limit.

Parameters

string $message

Return Value

string

at line 155
protected array eventMap()

Map config event names to Reverb event classes.

Return Value

array

at line 171
protected array defaultEvents()

Default events to record.

Return Value

array