Documentation

ExpirableToken
in package

A token with an expiration date.

Table of Contents

Properties

$expirationTime  : mixed
$value  : mixed

Methods

__construct()  : mixed
__set()  : mixed
The magic setter is overridden to insure immutability.
getExpirationTime()  : int
getValue()  : string
isValidUntil()  : bool
Checks if the token is still valid until the given time limit.

Properties

Methods

__construct()

public __construct(string $value, int $expirationTime) : mixed
Parameters
$value : string

The token value

$expirationTime : int

The token expiration timestamp

__set()

The magic setter is overridden to insure immutability.

public __set(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed

getExpirationTime()

public getExpirationTime() : int
Return values
int

The token expiration timestamp

getValue()

public getValue() : string
Return values
string

The token value

isValidUntil()

Checks if the token is still valid until the given time limit.

public isValidUntil(int $timeLimit) : bool
Parameters
$timeLimit : int

The timestamp representation of the limit

Return values
bool
On this page

Search results