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

Hide the given parameters.

from  Watcher
string
hideQueryParameters(string $uri)

Hide query credentials without changing unrelated URL bytes.

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

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 39
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 Watcher at line 55
protected string hideQueryParameters(string $uri)

Hide query credentials without changing unrelated URL bytes.

Parameters

string $uri

Return Value

string

at line 50
void recordRequest(RequestHandled $event)

Record an incoming HTTP request.

Parameters

RequestHandled $event

Return Value

void

at line 88
protected bool shouldIgnoreHttpMethod(RequestHandled $event)

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

Parameters

RequestHandled $event

Return Value

bool

at line 102
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 114
protected array headers(array $headers)

Format the given headers.

Parameters

array $headers

Return Value

array

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

Format the given payload.

Parameters

array|string $payload

Return Value

array|string

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

Format the given response object.

Parameters

Response $response

Return Value

array|string

at line 240
bool contentWithinLimits(string $content)

Determine if the content is within the set limits.

Parameters

string $content

Return Value

bool

at line 250
protected array extractDataFromView(View $view)

Extract the data from the given view in array form.

Parameters

View $view

Return Value

array

at line 276
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 299
protected array getContext()

Get the coroutine context data for the request.

Return Value

array