ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
CyclicReferenceStack.php
Go to the documentation of this file.
1<?php
37
43 private $_stack = array();
44
45
51 public function count() {
52 return count($this->_stack);
53 }
54
60 public function push($value) {
61 $this->_stack[$value] = $value;
62 }
63
69 public function pop() {
70 return array_pop($this->_stack);
71 }
72
78 public function onStack($value) {
79 return isset($this->_stack[$value]);
80 }
81
85 public function clear() {
86 $this->_stack = array();
87 }
88
94 public function showStack() {
95 return $this->_stack;
96 }
97
98}
An exception for terminatinating execution or to throw for unit testing.
pop()
Pop the last entry from the stack.
count()
Return the number of entries on the stack.
showStack()
Return an array of all entries on the stack.
push($value)
Push a new entry onto the stack.
onStack($value)
Test to see if a specified entry exists on the stack.