phpDocumentor

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

$expirationTimestamp

private int|null $expirationTimestamp

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
$key : string
$cachedValue :
$expirationTimestamp : int|null = null
Tags
throws
InvalidCacheKey
Return values
CachedData

createFromJson()

public static createFromJson(string $json[, array<string|int, mixed> $allowedClasses = [] ]) : CachedData
Parameters
$json : string
$allowedClasses : array<string|int, mixed> = []
Tags
throws
InvalidCacheKey

If key in provided JSON string is invalid.

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
Return values
mixed

Search results