Amp\Parallel\Worker\BasicEnvironment class BasicEnvironment implements Amp\Parallel\Worker\Environment

Summary

Properties

Methods

Properties

$data — public $data
No documentation.
$expire — public $expire = 0
No documentation.
$ttl — public $ttl
No documentation.

Methods

__construct — public function __construct()
No documentation.
exists — public function exists(string $key): bool
No documentation.
Type Parameter Description Default Value
string $key No documentation. none
get — public function get(string $key): mixed|null
No documentation.
Type Parameter Description Default Value
string $key No documentation. none
set — public function set(string $key, mixed $value, int $ttl = null)
No documentation.
Type Parameter Description Default Value
string $key No documentation. none
mixed $value Using null for the value deletes the key. none
int $ttl Number of seconds until data is automatically deleted. Use null for unlimited TTL. null
delete — public function delete(string $key)
No documentation.
Type Parameter Description Default Value
string $key No documentation. none
offsetExists — public function offsetExists($key): bool

Alias of exists().

Type Parameter Description Default Value
mixed $key No documentation. none
offsetGet — public function offsetGet(string $key): mixed

Alias of get().

Type Parameter Description Default Value
string $key No documentation. none
offsetSet — public function offsetSet(string $key, mixed $value)

Alias of set() with $ttl = null.

Type Parameter Description Default Value
string $key No documentation. none
mixed $value No documentation. none
offsetUnset — public function offsetUnset(string $key)

Alias of delete().

Type Parameter Description Default Value
string $key No documentation. none
clear — public function clear()

Removes all values.

__get — public function __get(string $property)
No documentation.
Type Parameter Description Default Value
string $property No documentation. none
__set — public function __set(string $property, $value)
No documentation.
Type Parameter Description Default Value
string $property No documentation. none
mixed $value No documentation. none