ILIAS
trunk Revision v11.0_alpha-1723-g8e69f309bab
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
Stack.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\components\DataCollection\Fields\Formula\FormulaParser
;
22
23
class
Stack
24
{
25
protected
array
$stack
= [];
26
30
public
function
push
($elem): void
31
{
32
$this->stack[] = $elem;
33
}
34
38
public
function
pop
()
39
{
40
if
(!$this->
isEmpty
()) {
41
$last_index =
count
($this->stack) - 1;
42
$elem = $this->stack[$last_index];
43
unset($this->stack[$last_index]);
44
$this->stack = array_values($this->stack);
// re-index
45
46
return
$elem;
47
}
48
49
return
null
;
50
}
51
55
public
function
top
()
56
{
57
if
(!$this->
isEmpty
()) {
58
return
$this->stack[
count
($this->stack) - 1];
59
}
60
61
return
null
;
62
}
63
64
public
function
isEmpty
(): bool
65
{
66
return
!(bool)
count
($this->stack);
67
}
68
69
public
function
reset
(): void
70
{
71
$this->stack = [];
72
}
73
74
public
function
count
():
int
75
{
76
return
count
($this->stack);
77
}
78
}
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\push
push($elem)
Definition:
Stack.php:30
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\pop
pop()
Definition:
Stack.php:38
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:142
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\isEmpty
isEmpty()
Definition:
Stack.php:64
ILIAS\components\DataCollection\Fields\Formula\FormulaParser
Definition:
ExpressionParser.php:21
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\$stack
array $stack
Definition:
Stack.php:25
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\reset
reset()
Definition:
Stack.php:69
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack
Definition:
Stack.php:23
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\top
top()
Definition:
Stack.php:55
ILIAS\components\DataCollection\Fields\Formula\FormulaParser\Stack\count
count()
Definition:
Stack.php:74
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
DataCollection
classes
Fields
Formula
FormulaParser
Stack.php
Generated on Sun Apr 6 2025 23:03:05 for ILIAS by
1.8.13 (using
Doxyfile
)