trait HasQuery

Properties

protected ArrayRepository|null $queryRepository

The request query parameters.

protected string|null $queryString

The already-encoded query string override.

Methods

string|null
queryString()

Get the raw query string override, without a leading question mark.

withQueryString(string $query)

Replace the base URL and endpoint query string.

array
queryParameters()

Get the request query parameters.

withQueryParameters(array $parameters)

Add query parameters to the request.

withoutQueryParameters(array|string $keys)

Remove the given query parameters from the request.

array
defaultQuery()

Resolve the default request query parameters.

string|null
defaultQueryString()

Resolve the default raw query string override.

queryRepository()

Get the request query repository.

Details

at line 24
string|null queryString()

Get the raw query string override, without a leading question mark.

Return Value

string|null

at line 32
HasQuery withQueryString(string $query)

Replace the base URL and endpoint query string.

Parameters

string $query

Return Value

HasQuery

at line 44
array queryParameters()

Get the request query parameters.

Return Value

array

at line 55
HasQuery withQueryParameters(array $parameters)

Add query parameters to the request.

Parameters

array $parameters

Return Value

HasQuery

at line 71
HasQuery withoutQueryParameters(array|string $keys)

Remove the given query parameters from the request.

Only values added through the query parameter methods are removed. Values embedded in the base URL, endpoint or raw query string are unchanged.

Parameters

array|string $keys

Return Value

HasQuery

at line 83
protected array defaultQuery()

Resolve the default request query parameters.

Return Value

array

at line 91
protected string|null defaultQueryString()

Resolve the default raw query string override.

Return Value

string|null

at line 99
protected ArrayRepository queryRepository()

Get the request query repository.

Return Value

ArrayRepository