SDK for PHP 3.x

EndpointList
in package

Table of Contents

Methods

__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.

Methods

__construct()

public __construct(array<string|int, mixed> $endpoints) : mixed
Parameters
$endpoints : array<string|int, 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
On this page