CsrfToken
in package
implements
Stringable
Represents a token used to determine the validity ot a request.
Interfaces, Classes, Traits and Enums
- Stringable
Table of Contents
- __construct() : mixed
- __toString() : string
- Returns the string represented by the this object.
- isExpired() : bool
- Determines if the token is expired.
- represents() : bool
- Determines if the given string is represented by this object.
Methods
__construct()
public
__construct(DateTimeImmutable $createdOn[, int $ttl = TOKEN_DEFAULT_TTL ]) : mixed
Parameters
- $createdOn : DateTimeImmutable
- $ttl : int = TOKEN_DEFAULT_TTL
Return values
mixed —__toString()
Returns the string represented by the this object.
public
__toString() : string
Return values
string —isExpired()
Determines if the token is expired.
public
isExpired() : bool
Return values
bool —represents()
Determines if the given string is represented by this object.
public
represents(string $stringToken) : bool
Parameters
- $stringToken : string