|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
A store bound to one namespace of one repository. More...
Inheritance diagram for ILIAS\KeyValueStorage\Internal\NamespacedStore:
Collaboration diagram for ILIAS\KeyValueStorage\Internal\NamespacedStore:Public Member Functions | |
| __construct (private readonly StorageNamespace $namespace, private readonly Repository $repository, private readonly KeyRules $key_rules, private readonly Values $values) | |
| has (string $key) | |
| Reads the value along, so that a following get() does not read again. More... | |
| get (string $key, Transformation $transformation) | |
| Reads a value and applies a Refinery transformation, like HTTP request wrappers. More... | |
| getMany (array $transformations) | |
| Reads several known keys, each with its own Refinery transformation. More... | |
| keys () | |
| The keys this namespace currently holds, sorted as strings. More... | |
| set (string $key, mixed $value) | |
| delete (string $key) | |
| clear () | |
| Removes every entry of this namespace, and only of this namespace. More... | |
| has (string $key) | |
| Reads the value along, so that a following get() does not read again. More... | |
| get (string $key, Transformation $transformation) | |
| Reads a value and applies a Refinery transformation, like HTTP request wrappers. More... | |
| getMany (array $transformations) | |
| Reads several known keys, each with its own Refinery transformation. More... | |
| keys () | |
| The keys this namespace currently holds, sorted as strings. More... | |
| set (string $key, mixed $value) | |
| delete (string $key) | |
| clear () | |
| Removes every entry of this namespace, and only of this namespace. More... | |
Private Member Functions | |
| readDecoded (string $key) | |
| mustLoadNamespaceFor (array $requested) | |
| loadNamespace () | |
Private Attributes | |
| array | $seen = [] |
| bool | $namespace_loaded = false |
| True once every entry of the namespace has been read. More... | |
A store bound to one namespace of one repository.
Validates the keys, encodes the values and remembers what it has already seen during this request, so that reading the same key twice does not hit the session or the database twice. Reading the keys of the namespace or several keys at once remembers every key of it. This is not a cross-request cache - use ILIAS\Cache for that.
Definition at line 38 of file NamespacedStore.php.
| ILIAS\KeyValueStorage\Internal\NamespacedStore::__construct | ( | private readonly StorageNamespace | $namespace, |
| private readonly Repository | $repository, | ||
| private readonly KeyRules | $key_rules, | ||
| private readonly Values | $values | ||
| ) |
Definition at line 53 of file NamespacedStore.php.
| ILIAS\KeyValueStorage\Internal\NamespacedStore::clear | ( | ) |
Removes every entry of this namespace, and only of this namespace.
Implements ILIAS\KeyValueStorage\Store.
Definition at line 151 of file NamespacedStore.php.
References ILIAS\UI\examples\Deck\repository().
Here is the call graph for this function:| ILIAS\KeyValueStorage\Internal\NamespacedStore::delete | ( | string | $key | ) |
InvalidArgumentException if the key is invalid
Implements ILIAS\KeyValueStorage\Store.
Definition at line 143 of file NamespacedStore.php.
References ILIAS\UI\examples\Deck\repository().
Here is the call graph for this function:| ILIAS\KeyValueStorage\Internal\NamespacedStore::get | ( | string | $key, |
| Transformation | $transformation | ||
| ) |
Reads a value and applies a Refinery transformation, like HTTP request wrappers.
Absent keys are passed to the transformation as null.
InvalidArgumentException if the key is invalid
| Exception |
InvalidStoredValueException if the stored value cannot be read back
Implements ILIAS\KeyValueStorage\Store.
Definition at line 70 of file NamespacedStore.php.
References ILIAS\KeyValueStorage\Internal\NamespacedStore\readDecoded().
Here is the call graph for this function:| ILIAS\KeyValueStorage\Internal\NamespacedStore::getMany | ( | array | $transformations | ) |
Reads several known keys, each with its own Refinery transformation.
The result has the same keys as the given map, in the same order. Absent keys are passed to their transformation as null, like {
| array<string,Transformation> | $transformations |
InvalidArgumentException if a key is invalid or an entry is not a transformation
| Exception |
InvalidStoredValueException if a stored value cannot be read back
Implements ILIAS\KeyValueStorage\Store.
Definition at line 79 of file NamespacedStore.php.
References ILIAS\KeyValueStorage\Internal\NamespacedStore\loadNamespace(), ILIAS\KeyValueStorage\Internal\NamespacedStore\mustLoadNamespaceFor(), and ILIAS\KeyValueStorage\Internal\NamespacedStore\readDecoded().
Here is the call graph for this function:| ILIAS\KeyValueStorage\Internal\NamespacedStore::has | ( | string | $key | ) |
Reads the value along, so that a following get() does not read again.
InvalidArgumentException if the key is invalid
| Exception |
InvalidStoredValueException if the stored value cannot be read back
Implements ILIAS\KeyValueStorage\Store.
Definition at line 61 of file NamespacedStore.php.
References ILIAS\KeyValueStorage\Internal\NamespacedStore\readDecoded().
Here is the call graph for this function:| ILIAS\KeyValueStorage\Internal\NamespacedStore::keys | ( | ) |
The keys this namespace currently holds, sorted as strings.
Implements ILIAS\KeyValueStorage\Store.
Definition at line 108 of file NamespacedStore.php.
References ILIAS\KeyValueStorage\Internal\NamespacedStore\loadNamespace(), and ILIAS\UI\examples\Symbol\Glyph\Sort\sort().
Here is the call graph for this function:
|
private |
Definition at line 195 of file NamespacedStore.php.
References ILIAS\UI\examples\Deck\repository().
Referenced by ILIAS\KeyValueStorage\Internal\NamespacedStore\getMany(), and ILIAS\KeyValueStorage\Internal\NamespacedStore\keys().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
| array<string,Transformation> | $requested |
Definition at line 180 of file NamespacedStore.php.
Referenced by ILIAS\KeyValueStorage\Internal\NamespacedStore\getMany().
Here is the caller graph for this function:
|
private |
Definition at line 161 of file NamespacedStore.php.
References ILIAS\UI\examples\Deck\repository().
Referenced by ILIAS\KeyValueStorage\Internal\NamespacedStore\get(), ILIAS\KeyValueStorage\Internal\NamespacedStore\getMany(), and ILIAS\KeyValueStorage\Internal\NamespacedStore\has().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\KeyValueStorage\Internal\NamespacedStore::set | ( | string | $key, |
| mixed | $value | ||
| ) |
InvalidArgumentException if the key is invalid or the value cannot be stored
Implements ILIAS\KeyValueStorage\Store.
Definition at line 124 of file NamespacedStore.php.
References ILIAS\UI\examples\Deck\repository().
Here is the call graph for this function:
|
private |
True once every entry of the namespace has been read.
Later lookups of keys this request has not touched can then be answered without the backend.
Definition at line 51 of file NamespacedStore.php.
|
private |
Definition at line 45 of file NamespacedStore.php.