ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
Session based immediate storage. More...
Public Member Functions | |
__construct (string $a_component_id, string $a_sess_id='') | |
set (string $a_key, string $a_val) | |
get (string $a_key) | |
Static Public Member Functions | |
static | destroySession ($a_session_id) |
Destroy session(s). More... | |
Private Member Functions | |
initComponentCacheIfNotExists () | |
Private Attributes | |
string | $session_id |
string | $component_id |
Static Private Attributes | |
static array | $values = [] |
Session based immediate storage.
This class stores session based user data in the database. The difference to ilSession is that data is written immediately when the set() function is called and that this data is written "per key".
Please note that the values are limited to TEXT(1000)!
This class is needed for cases, where ajax calls should write session based data.
Since more concurrent ajax calls can be initiated by a page request, these calls may run into race conditions, if ilSession is used, since it always reads all key/value pairs at the beginning of a request and writes all of them at the end. Similar issues can appear if a page initiates additional requests by (i)frames.
Definition at line 39 of file class.ilSessionIStorage.php.
ilSessionIStorage::__construct | ( | string | $a_component_id, |
string | $a_sess_id = '' |
||
) |
Definition at line 45 of file class.ilSessionIStorage.php.
|
static |
Destroy session(s).
This is called by ilSession->destroy
string|list<string> | $a_session_id Ids of sessions to be deleted |
Definition at line 112 of file class.ilSessionIStorage.php.
Referenced by ilSession\_destroy().
ilSessionIStorage::get | ( | string | $a_key | ) |
Definition at line 82 of file class.ilSessionIStorage.php.
References $component_id, $DIC, $ilDB, and initComponentCacheIfNotExists().
|
private |
Definition at line 55 of file class.ilSessionIStorage.php.
References $component_id.
Referenced by get(), and set().
ilSessionIStorage::set | ( | string | $a_key, |
string | $a_val | ||
) |
Definition at line 62 of file class.ilSessionIStorage.php.
References $component_id, $DIC, $ilDB, and initComponentCacheIfNotExists().
|
private |
Definition at line 42 of file class.ilSessionIStorage.php.
Referenced by get(), initComponentCacheIfNotExists(), and set().
|
private |
Definition at line 41 of file class.ilSessionIStorage.php.
|
staticprivate |
Definition at line 43 of file class.ilSessionIStorage.php.