19declare(strict_types=1);
42 private const string PREFIX =
'kvs:';
55 return \is_string($value) ? $value :
null;
61 $prefix_length = \strlen($prefix);
65 if (!\str_starts_with($session_key, $prefix)) {
70 if (!\is_string($value)) {
74 $entries[\substr($session_key, $prefix_length)] = $value;
95 if (\str_starts_with($session_key, $prefix)) {
Keeps key-value storage in the ILIAS session.
readAll(StorageNamespace $namespace)
Every present entry of one namespace.
removeAll(StorageNamespace $namespace)
sessionKey(StorageNamespace $namespace, string $key)
namespacePrefix(StorageNamespace $namespace)
read(StorageNamespace $namespace, string $key)
write(StorageNamespace $namespace, string $key, string $value)
has(StorageNamespace $namespace, string $key)
Isolates the keys of one consumer from every other consumer of a storage.
static get(string $a_var)
static clear(string $a_var)
static keys()
The names of all variables currently held in the session.
static set(string $a_var, $a_val)
Set a value.
Persistence of the session scope, implemented by the component owning the ILIAS session.