ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
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
k
l
m
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
class.ilDclStack.php
Go to the documentation of this file.
1
<?php
2
9
class
ilDclStack
{
10
14
protected
$stack
= array();
15
16
20
public
function
push
($elem) {
21
$this->stack[] = $elem;
22
}
23
24
28
public
function
pop
() {
29
if
(!$this->
isEmpty
()) {
30
$last_index =
count
($this->stack) - 1;
31
$elem = $this->stack[$last_index];
32
unset($this->stack[$last_index]);
33
$this->stack = array_values($this->stack);
// re-index
34
return
$elem;
35
}
36
37
return
NULL;
38
}
39
40
44
public
function
top
() {
45
if
(!$this->
isEmpty
()) {
46
return
$this->stack[
count
($this->stack) - 1];
47
}
48
49
return
NULL;
50
}
51
52
56
public
function
isEmpty
() {
57
return
!(bool)
count
($this->stack);
58
}
59
60
61
public
function
reset
() {
62
$this->stack = array();
63
}
64
65
69
public
function
count
() {
70
return
count
($this->stack);
71
}
72
73
74
public
function
debug
() {
75
echo
"<pre>"
. print_r($this->stack, 1) .
"</pre>"
;
76
}
77
}
78
79
?>
ilDclStack\count
count()
Definition:
class.ilDclStack.php:69
ilDclStack\push
push($elem)
Definition:
class.ilDclStack.php:20
ilDclStack\reset
reset()
Definition:
class.ilDclStack.php:61
ilDclStack
Class ilDclStack.
Definition:
class.ilDclStack.php:9
ilDclStack\isEmpty
isEmpty()
Definition:
class.ilDclStack.php:56
ilDclStack\top
top()
Definition:
class.ilDclStack.php:44
ilDclStack\debug
debug()
Definition:
class.ilDclStack.php:74
ilDclStack\pop
pop()
Definition:
class.ilDclStack.php:28
ilDclStack\$stack
$stack
Definition:
class.ilDclStack.php:14
Modules
DataCollection
classes
Field
Formula
class.ilDclStack.php
Generated on Mon Apr 7 2025 19:00:38 for ILIAS by
1.8.13 (using
Doxyfile
)