trait HasApiVersion

Properties

protected string|null $apiVersion

API Version.

protected VersionMode $versionMode

Where the API version should be applied to the request.

protected string $versionKey

The header or query parameter name used for the API version.

Methods

string|null
getApiVersion()

Get the API version.

void
bootHasApiVersion(PendingRequest $pendingRequest)

Boot HasApiVersion plugin.

string
ensureVersionIsSafeForUrl(string $version)

Ensure the version can only ever form a single subdomain label or path segment.

Details

at line 34
string|null getApiVersion()

Get the API version.

Return Value

string|null

at line 42
void bootHasApiVersion(PendingRequest $pendingRequest)

Boot HasApiVersion plugin.

Parameters

PendingRequest $pendingRequest

Return Value

void

at line 63
protected string ensureVersionIsSafeForUrl(string $version)

Ensure the version can only ever form a single subdomain label or path segment.

Parameters

string $version

Return Value

string

Exceptions

InvalidArgumentException