ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\KeyValueStorage\Services Interface Reference

Entry point to the namespace-scoped key-value storages of ILIAS. More...

+ Inheritance diagram for ILIAS\KeyValueStorage\Services:
+ Collaboration diagram for ILIAS\KeyValueStorage\Services:

Public Member Functions

 session (array $namespace)
 Storage bound to the current user session. More...
 
 persistent (array $namespace)
 Storage that survives session boundaries until changed or cleared. More...
 
 persistentFor (SubjectResolver $subjects, array $namespace)
 Persistent storage for the subject the resolver names. More...
 
 purgeSubject (SubjectId $subject)
 Removes every subject-scoped entry for this subject, in every namespace. More...
 

Detailed Description

Entry point to the namespace-scoped key-value storages of ILIAS.

The scope is chosen by the accessor: session storage is bound to the current user session, persistent storage survives session boundaries until it is changed or cleared.

Definition at line 33 of file Services.php.

Member Function Documentation

◆ persistent()

ILIAS\KeyValueStorage\Services::persistent ( array  $namespace)

Storage that survives session boundaries until changed or cleared.

This storage has no subject: it is shared by every user of the installation and only reads rows whose provider and subject are empty. Per-subject state belongs in {

See also
self::persistentFor()}. Encoding a subject into the namespace or the key is not a supported substitute.
Parameters
list<string>$namespace namespace segments; joined with "." internally

Implemented in ILIAS\KeyValueStorage\Internal\StorageServices.

◆ persistentFor()

ILIAS\KeyValueStorage\Services::persistentFor ( SubjectResolver  $subjects,
array  $namespace 
)

Persistent storage for the subject the resolver names.

Anonymous and any other non-named subject are rejected. The subject is a parameter of the storage, never part of the namespace or the key.

Parameters
list<string>$namespace namespace segments; joined with "." internally
Exceptions

InvalidArgumentException if the resolver does not name a subject, or the subject's provider is not contributed under its name

Implemented in ILIAS\KeyValueStorage\Internal\StorageServices.

◆ purgeSubject()

ILIAS\KeyValueStorage\Services::purgeSubject ( SubjectId  $subject)

Removes every subject-scoped entry for this subject, in every namespace.

Global installation state from {

See also
self::persistent()} is not touched.
Exceptions

InvalidArgumentException if the subject's provider is not contributed under its name

Implemented in ILIAS\KeyValueStorage\Internal\StorageServices.

◆ session()

ILIAS\KeyValueStorage\Services::session ( array  $namespace)

Storage bound to the current user session.

Parameters
list<string>$namespace namespace segments; joined with "." internally

Implemented in ILIAS\KeyValueStorage\Internal\StorageServices.


The documentation for this interface was generated from the following file: