ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS\KioskMode\State Class Reference

Keeps the state of a view in a simple stringly type key-value store. More...

+ Collaboration diagram for ILIAS\KioskMode\State:

Public Member Functions

 withValueFor (string $key, string $value)
 Set a value for a key of the state. More...
 
 withoutKey (string $key)
 Remove the key-value-pair. More...
 
 getValueFor (string $key)
 Get the value for the given key. More...
 
 serialize ()
 Get the key-value store as string. More...
 

Protected Attributes

 $store
 

Detailed Description

Keeps the state of a view in a simple stringly type key-value store.

Definition at line 9 of file State.php.

Member Function Documentation

◆ getValueFor()

ILIAS\KioskMode\State::getValueFor ( string  $key)

Get the value for the given key.

Definition at line 40 of file State.php.

40 : string
41 {
42 return $this->store[$key];
43 }
$key
Definition: croninfo.php:18

References $key.

◆ serialize()

ILIAS\KioskMode\State::serialize ( )

Get the key-value store as string.

Definition at line 48 of file State.php.

48 : string
49 {
50 return json_encode($this->store);
51 }

◆ withoutKey()

ILIAS\KioskMode\State::withoutKey ( string  $key)

Remove the key-value-pair.

Definition at line 30 of file State.php.

30 : State
31 {
32 $clone = clone $this;
33 unset($clone->store[$key]);
34 return $clone;
35 }

References $key.

◆ withValueFor()

ILIAS\KioskMode\State::withValueFor ( string  $key,
string  $value 
)

Set a value for a key of the state.

Definition at line 20 of file State.php.

20 : State
21 {
22 $clone = clone $this;
23 $clone->store[$key] = $value;
24 return $clone;
25 }

References $key.

Field Documentation

◆ $store

ILIAS\KioskMode\State::$store
protected

Definition at line 15 of file State.php.


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