class RequestWatcher 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
recordRequest(RequestHandled $event)

Record an incoming HTTP request.

bool
shouldIgnoreHttpMethod(RequestHandled $event)

Determine if the request should be ignored based on its method.

bool
shouldIgnoreStatusCode(RequestHandled $event)

Determine if the request should be ignored based on its status code.

array
headers(array $headers)

Format the given headers.

array|string
payload(array|string $payload)

Format the given payload.

array
hideParameters(array $data, array $hidden)

Hide the given parameters.

array|string
response(Response $response)

Format the given response object.

bool
contentWithinLimits(string $content)

Determine if the content is within the set limits.

array
extractDataFromView(View $view)

Extract the data from the given view in array form.

array|null
facadeContext()

Get the current facade context for the request.

array
getContext()

Get the coroutine context data for the request.

Details

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

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 37
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 48
void recordRequest(RequestHandled $event)

Record an incoming HTTP request.

Parameters

RequestHandled $event

Return Value

void

at line 84
protected bool shouldIgnoreHttpMethod(RequestHandled $event)

Determine if the request should be ignored based on its method.

Parameters

RequestHandled $event

Return Value

bool

at line 97
protected bool shouldIgnoreStatusCode(RequestHandled $event)

Determine if the request should be ignored based on its status code.

Parameters

RequestHandled $event

Return Value

bool

at line 108
protected array headers(array $headers)

Format the given headers.

Parameters

array $headers

Return Value

array

at line 123
protected array|string payload(array|string $payload)

Format the given payload.

Parameters

array|string $payload

Return Value

array|string

at line 138
protected array hideParameters(array $data, array $hidden)

Hide the given parameters.

Parameters

array $data
array $hidden

Return Value

array

at line 181
protected array|string response(Response $response)

Format the given response object.

Parameters

Response $response

Return Value

array|string

at line 220
bool contentWithinLimits(string $content)

Determine if the content is within the set limits.

Parameters

string $content

Return Value

bool

at line 230
protected array extractDataFromView(View $view)

Extract the data from the given view in array form.

Parameters

View $view

Return Value

array

at line 255
protected array|null facadeContext()

Get the current facade context for the request.

Returns both visible and hidden context. Returns null when no context exists to avoid showing an empty tab.

Return Value

array|null

at line 278
protected array getContext()

Get the coroutine context data for the request.

Return Value

array