class Key

Key is a container for the state of the locks in stores.

Methods

__construct(string $resource)

No description

__toString()

No description

bool
hasState(string $stateKey)

No description

setState(string $stateKey, mixed $state)

No description

removeState(string $stateKey)

No description

mixed
getState($stateKey)

No description

resetLifetime()

No description

reduceLifetime(float $ttl)

No description

float|null
getRemainingLifetime()

Returns the remaining lifetime.

bool
isExpired()

No description

Details

at line 28
__construct(string $resource)

Parameters

string $resource

at line 33
__toString()

at line 43
bool hasState(string $stateKey)

Parameters

string $stateKey

Return Value

bool

at line 52
setState(string $stateKey, mixed $state)

Parameters

string $stateKey
mixed $state

at line 60
removeState(string $stateKey)

Parameters

string $stateKey

at line 70
mixed getState($stateKey)

Parameters

$stateKey

Return Value

mixed

at line 75
resetLifetime()

at line 83
reduceLifetime(float $ttl)

Parameters

float $ttl the expiration delay of locks in seconds

at line 97
float|null getRemainingLifetime()

Returns the remaining lifetime.

Return Value

float|null Remaining lifetime in seconds. Null when the key won't expire.

at line 105
bool isExpired()

Return Value

bool