|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Keeps key-value storage in the ILIAS session. More...
Inheritance diagram for ILIAS\Authentication\KeyValueStorage\SessionRepository:
Collaboration diagram for ILIAS\Authentication\KeyValueStorage\SessionRepository:Public Member Functions | |
| has (StorageNamespace $namespace, string $key) | |
| read (StorageNamespace $namespace, string $key) | |
| readAll (StorageNamespace $namespace) | |
| Every present entry of one namespace. More... | |
| write (StorageNamespace $namespace, string $key, string $value) | |
| remove (StorageNamespace $namespace, string $key) | |
| removeAll (StorageNamespace $namespace) | |
| has (StorageNamespace $namespace, string $key) | |
| read (StorageNamespace $namespace, string $key) | |
| readAll (StorageNamespace $namespace) | |
| Every present entry of one namespace. More... | |
| write (StorageNamespace $namespace, string $key, string $value) | |
| remove (StorageNamespace $namespace, string $key) | |
| removeAll (StorageNamespace $namespace) | |
Private Member Functions | |
| sessionKey (StorageNamespace $namespace, string $key) | |
| namespacePrefix (StorageNamespace $namespace) | |
Private Attributes | |
| const string | PREFIX = 'kvs:' |
| const string | SEPARATOR = ':' |
Keeps key-value storage in the ILIAS session.
Every entry is a session variable of its own, named "<prefix><namespace>:<key>". ilSession only knows single keys - it can neither list nor clear by prefix - so one nested array per namespace would mean reading and writing the whole array on every single write. Flat keys keep a write to one entry, at the price of scanning the session when a whole namespace is read or dropped, which happens rarely.
The colon is what separates namespace from key: it cannot occur in a namespace, and keys must not contain it, so no pair of namespace and key can ever produce the session key of another pair.
Definition at line 40 of file SessionRepository.php.
| ILIAS\Authentication\KeyValueStorage\SessionRepository::has | ( | StorageNamespace | $namespace, |
| string | $key | ||
| ) |
Implements ILIAS\KeyValueStorage\Repository.
Definition at line 46 of file SessionRepository.php.
References ILIAS\GlobalScreen\has(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\sessionKey().
Here is the call graph for this function:
|
private |
Definition at line 106 of file SessionRepository.php.
References ILIAS\Authentication\KeyValueStorage\SessionRepository\SEPARATOR, and ILIAS\KeyValueStorage\Internal\StorageNamespace\value().
Referenced by ILIAS\Authentication\KeyValueStorage\SessionRepository\readAll(), ILIAS\Authentication\KeyValueStorage\SessionRepository\removeAll(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\sessionKey().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\Authentication\KeyValueStorage\SessionRepository::read | ( | StorageNamespace | $namespace, |
| string | $key | ||
| ) |
Implements ILIAS\KeyValueStorage\Repository.
Definition at line 51 of file SessionRepository.php.
References ilSession\get(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\sessionKey().
Here is the call graph for this function:| ILIAS\Authentication\KeyValueStorage\SessionRepository::readAll | ( | StorageNamespace | $namespace | ) |
Every present entry of one namespace.
Implements ILIAS\KeyValueStorage\Repository.
Definition at line 58 of file SessionRepository.php.
References ilSession\get(), ilSession\keys(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\namespacePrefix().
Here is the call graph for this function:| ILIAS\Authentication\KeyValueStorage\SessionRepository::remove | ( | StorageNamespace | $namespace, |
| string | $key | ||
| ) |
Implements ILIAS\KeyValueStorage\Repository.
Definition at line 85 of file SessionRepository.php.
References ilSession\clear(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\sessionKey().
Here is the call graph for this function:| ILIAS\Authentication\KeyValueStorage\SessionRepository::removeAll | ( | StorageNamespace | $namespace | ) |
Implements ILIAS\KeyValueStorage\Repository.
Definition at line 90 of file SessionRepository.php.
References ilSession\clear(), ilSession\keys(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\namespacePrefix().
Here is the call graph for this function:
|
private |
Definition at line 101 of file SessionRepository.php.
References ILIAS\Authentication\KeyValueStorage\SessionRepository\namespacePrefix().
Referenced by ILIAS\Authentication\KeyValueStorage\SessionRepository\has(), ILIAS\Authentication\KeyValueStorage\SessionRepository\read(), ILIAS\Authentication\KeyValueStorage\SessionRepository\remove(), and ILIAS\Authentication\KeyValueStorage\SessionRepository\write().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\Authentication\KeyValueStorage\SessionRepository::write | ( | StorageNamespace | $namespace, |
| string | $key, | ||
| string | $value | ||
| ) |
Implements ILIAS\KeyValueStorage\Repository.
Definition at line 80 of file SessionRepository.php.
References ILIAS\Authentication\KeyValueStorage\SessionRepository\sessionKey(), and ilSession\set().
Here is the call graph for this function:
|
private |
Definition at line 42 of file SessionRepository.php.
|
private |
Definition at line 44 of file SessionRepository.php.
Referenced by ILIAS\Authentication\KeyValueStorage\SessionRepository\namespacePrefix().