ILIAS
release_8 Revision v8.24
◀ ilDoc Overview
class.ilForumThreadSettingsSessionStorage.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
class
ilForumThreadSettingsSessionStorage
22
{
23
private
string
$key
;
24
25
public
function
__construct
(
string
$session_key)
26
{
27
$this->key = $session_key;
28
}
29
33
private
function
getSessionCollection
(): array
34
{
35
$frm_sess =
ilSession::get
(
'frm_sess'
);
36
if
(!is_array($frm_sess)) {
37
$frm_sess = [];
38
}
39
40
if
(!isset($frm_sess[$this->key]) || !is_array($frm_sess[$this->key])) {
41
$frm_sess[
$this->key
] = [];
42
}
43
44
return
$frm_sess;
45
}
46
52
public
function
get
(
int
$thread_id, $default =
null
)
53
{
54
$frm_sess = $this->
getSessionCollection
();
55
56
return
$frm_sess[
$this->key
][$thread_id] ?? $default;
57
}
58
63
public
function
set
(
int
$thread_id, $value):
void
64
{
65
$frm_sess = $this->
getSessionCollection
();
66
67
$frm_sess[
$this->key
][$thread_id] = $value;
68
69
ilSession::set
(
'frm_sess'
, $frm_sess);
70
}
71
}
ilForumThreadSettingsSessionStorage
Definition:
class.ilForumThreadSettingsSessionStorage.php:22
ilForumThreadSettingsSessionStorage\__construct
__construct(string $session_key)
Definition:
class.ilForumThreadSettingsSessionStorage.php:25
ilForumThreadSettingsSessionStorage\getSessionCollection
getSessionCollection()
Definition:
class.ilForumThreadSettingsSessionStorage.php:33
ilForumThreadSettingsSessionStorage\$key
string $key
Definition:
class.ilForumThreadSettingsSessionStorage.php:23
ilSession\get
static get(string $a_var)
Definition:
class.ilSession.php:459
ilSession\set
static set(string $a_var, $a_val)
Set a value.
Definition:
class.ilSession.php:451
Modules
Forum
classes
class.ilForumThreadSettingsSessionStorage.php
Generated on Mon Nov 3 2025 22:01:23 for ILIAS by
1.9.4 (using
Doxyfile
)