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

Create a new watcher instance.

Parameters

array $options

the configured watcher options

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

at line 54
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 82
protected array extractEventData(string $eventName, object $event)

Extract entry content from the event.

Parameters

string $eventName
object $event

Return Value

array

at line 124
protected array extractTags(object $event)

Extract tags for the entry.

Parameters

object $event

Return Value

array

at line 142
protected string truncateMessage(string $message)

Truncate message content to the configured size limit.

Parameters

string $message

Return Value

string

at line 152
protected array eventMap()

Map config event names to Reverb event classes.

Return Value

array

at line 168
protected array defaultEvents()

Default events to record.

Return Value

array