ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilDclStack.php
Go to the documentation of this file.
1
<?php
2
9
class
ilDclStack
10
{
11
15
protected
$stack
=
array
();
16
17
21
public
function
push
($elem)
22
{
23
$this->stack[] = $elem;
24
}
25
26
30
public
function
pop
()
31
{
32
if
(!$this->
isEmpty
()) {
33
$last_index =
count
($this->stack) - 1;
34
$elem = $this->stack[$last_index];
35
unset($this->stack[$last_index]);
36
$this->stack = array_values($this->stack);
// re-index
37
return
$elem;
38
}
39
40
return
null;
41
}
42
43
47
public
function
top
()
48
{
49
if
(!$this->
isEmpty
()) {
50
return
$this->stack[
count
($this->stack) - 1];
51
}
52
53
return
null;
54
}
55
56
60
public
function
isEmpty
()
61
{
62
return
!(bool)
count
($this->stack);
63
}
64
65
66
public
function
reset
()
67
{
68
$this->stack =
array
();
69
}
70
71
75
public
function
count
()
76
{
77
return
count
($this->stack);
78
}
79
80
81
public
function
debug
()
82
{
83
echo
"<pre>"
. print_r($this->stack, 1) .
"</pre>"
;
84
}
85
}
ilDclStack\count
count()
Definition:
class.ilDclStack.php:75
ilDclStack\push
push($elem)
Definition:
class.ilDclStack.php:21
ilDclStack\reset
reset()
Definition:
class.ilDclStack.php:66
ilDclStack
Class ilDclStack.
Definition:
class.ilDclStack.php:9
ilDclStack\isEmpty
isEmpty()
Definition:
class.ilDclStack.php:60
ilDclStack\top
top()
Definition:
class.ilDclStack.php:47
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilDclStack\debug
debug()
Definition:
class.ilDclStack.php:81
ilDclStack\pop
pop()
Definition:
class.ilDclStack.php:30
ilDclStack\$stack
$stack
Definition:
class.ilDclStack.php:15
Modules
DataCollection
classes
Fields
Formula
class.ilDclStack.php
Generated on Tue Mar 11 2025 19:02:02 for ILIAS by
1.8.13 (using
Doxyfile
)