Documentation

ExpirableToken
in package

A token with an expiration date.

Table of Contents

$expirationTime  : mixed
$value  : mixed
__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

Return values
mixed

__set()

The magic setter is overridden to insure immutability.

public __set( $name,  $value) : mixed
Parameters
$name :
$value :
Return values
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

Search results