ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
Collection.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\ScreenContext\AdditionalData
;
21
22
use
LogicException
;
23
28
class
Collection
29
{
30
private
array
$values
= [];
31
35
public
function
getData
(): array
36
{
37
return
$this->values
;
38
}
39
44
public
function
add
(
string
$key
, $value): void
45
{
46
if
($this->
exists
($key)) {
47
throw
new
LogicException
(
"Key $key already exists."
);
48
}
49
$this->values[
$key
] = $value;
50
}
51
56
public
function
get
(
string
$key
)
57
{
58
return
$this->values[
$key
];
59
}
60
66
public
function
is
(
string
$key
, $expected_value): bool
67
{
68
return
($this->
exists
($key) && $this->
get
($key) === $expected_value);
69
}
70
75
public
function
exists
(
string
$key
): bool
76
{
77
return
isset($this->values[$key]);
78
}
79
84
public
function
replace
(
string
$key
, $value): void
85
{
86
if
(!$this->
exists
($key)) {
87
throw
new
LogicException
(
"Key $key does not exists."
);
88
}
89
$this->values[
$key
] = $value;
90
}
91
}
LogicException
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection\add
add(string $key, $value)
Definition:
Collection.php:44
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection\is
is(string $key, $expected_value)
Definition:
Collection.php:66
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection\exists
exists(string $key)
Definition:
Collection.php:75
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection
Class Collection.
Definition:
Collection.php:28
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection\$values
array $values
Definition:
Collection.php:30
ILIAS\LTI\ToolProvider\$key
string $key
Consumer key/client ID value.
Definition:
System.php:193
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection\replace
replace(string $key, $value)
Definition:
Collection.php:84
ILIAS\GlobalScreen\ScreenContext\AdditionalData
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Collection.php:20
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection\getData
getData()
Definition:
Collection.php:35
src
GlobalScreen
ScreenContext
AdditionalData
Collection.php
Generated on Sun Apr 6 2025 22:02:59 for ILIAS by
1.8.13 (using
Doxyfile
)