Documentation

EndpointList
in package

Table of Contents

$active  : mixed
$expired  : mixed
__construct()  : mixed
getActive()  : null|string
Gets an active (unexpired) endpoint. Returns null if none found.
getEndpoint()  : null|string
Gets an active endpoint if possible, then an expired endpoint if possible.
remove()  : mixed
Removes an endpoint from both lists.
getExpired()  : null|string
Get an expired endpoint. Returns null if none found.
increment()  : mixed

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $endpoints) : mixed
Parameters
$endpoints : array<string|int, mixed>
Return values
mixed

getActive()

Gets an active (unexpired) endpoint. Returns null if none found.

public getActive() : null|string
Return values
null|string

getEndpoint()

Gets an active endpoint if possible, then an expired endpoint if possible.

public getEndpoint() : null|string

Returns null if no endpoints found.

Return values
null|string

remove()

Removes an endpoint from both lists.

public remove(string $key) : mixed
Parameters
$key : string
Return values
mixed

getExpired()

Get an expired endpoint. Returns null if none found.

private getExpired() : null|string
Return values
null|string

increment()

private increment(mixed &$array) : mixed
Parameters
$array : mixed
Return values
mixed

Search results