ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
q
r
s
t
u
v
w
x
z
+
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
ContextStack.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\ScreenContext\Stack
;
21
22
use
ILIAS\GlobalScreen\ScreenContext\ScreenContext
;
23
use
LogicException
;
24
29
class
ContextStack
30
{
34
protected
$stack
= [];
35
39
public
function
push
(
ScreenContext
$context
) : void
40
{
41
if
(in_array($context, $this->stack)) {
42
throw
new
LogicException
(
"A context can only be claimed once"
);
43
}
44
$this->stack[] =
$context
;
45
}
46
50
public
function
getLast
() :
ScreenContext
51
{
52
return
end($this->stack);
53
}
54
58
public
function
getStack
() : array
59
{
60
return
$this->stack
;
61
}
62
66
public
function
getStackAsArray
() : array
67
{
68
$return = [];
69
foreach
($this->stack as $item) {
70
$return[] = $item->getUniqueContextIdentifier();
71
}
72
73
return
$return;
74
}
75
}
LogicException
ILIAS\GlobalScreen\ScreenContext\Stack\ContextStack\getStackAsArray
getStackAsArray()
Definition:
ContextStack.php:66
$context
$context
Definition:
webdav.php:26
ILIAS\GlobalScreen\ScreenContext\Stack\ContextStack
Class ContextStack.
Definition:
ContextStack.php:29
ILIAS\GlobalScreen\ScreenContext\Stack\ContextStack\$stack
$stack
Definition:
ContextStack.php:34
ScreenContext
ILIAS\GlobalScreen\ScreenContext\Stack\ContextStack\getStack
getStack()
Definition:
ContextStack.php:58
ILIAS\GlobalScreen\ScreenContext\Stack\ContextStack\push
push(ScreenContext $context)
Definition:
ContextStack.php:39
ILIAS\GlobalScreen\ScreenContext\Stack\ContextStack\getLast
getLast()
Definition:
ContextStack.php:50
ILIAS\GlobalScreen\ScreenContext\Stack
Definition:
CalledContexts.php:21
ILIAS\GlobalScreen\ScreenContext\ScreenContext
Interface ScreenContext.
Definition:
ScreenContext.php:29
src
GlobalScreen
ScreenContext
Stack
ContextStack.php
Generated on Sat Apr 5 2025 21:01:45 for ILIAS by
1.8.13 (using
Doxyfile
)