CachedData
in package
Class CachedData
Table of Contents
- $cachedValue : mixed
- $expirationTimestamp : int|null
- $key : string
- __toString() : string
- cachedValue() : mixed
- create() : CachedData
- createFromJson() : CachedData
- expirationTimestamp() : int|null
- isExpired() : bool
- key() : string
- __construct() : mixed
- CachedData constructor.
Properties
$cachedValue
private
mixed
$cachedValue
$expirationTimestamp
private
int|null
$expirationTimestamp
$key
private
string
$key
Methods
__toString()
public
__toString() : string
Return values
string —cachedValue()
public
cachedValue() : mixed
Return values
mixed —create()
public
static create(string $key, $cachedValue[, int|null $expirationTimestamp = null ]) : CachedData
Parameters
Tags
Return values
CachedData —createFromJson()
public
static createFromJson(string $json[, array<string|int, mixed> $allowedClasses = [] ]) : CachedData
Parameters
- $json : string
- $allowedClasses : array<string|int, mixed> = []
Tags
Return values
CachedData —expirationTimestamp()
public
expirationTimestamp() : int|null
Return values
int|null —isExpired()
public
isExpired() : bool
Return values
bool —key()
public
key() : string
Return values
string —__construct()
CachedData constructor.
private
__construct(string $key, mixed $cachedValue, int|null $expirationTimestamp) : mixed
Parameters
- $key : string
- $cachedValue : mixed
- $expirationTimestamp : int|null