--- /dev/null
+<?php
+/**
+ * @category Horde
+ * @package Support
+ * @copyright 2008-2009 The Horde Project (http://www.horde.org/)
+ * @license http://opensource.org/licenses/bsd-license.php
+ */
+
+/**
+ * Simple class for using an array as a stack.
+ *
+ * @category Horde
+ * @package Support
+ * @copyright 2008-2009 The Horde Project (http://www.horde.org/)
+ * @license http://opensource.org/licenses/bsd-license.php
+ */
+class Horde_Support_Stack
+{
+ /**
+ * @var array
+ */
+ protected $_stack = array();
+
+ public function __construct($stack = array())
+ {
+ $this->_a = $stack;
+ }
+
+ public function push($value)
+ {
+ $this->_stack[] = $value;
+ }
+
+ public function pop()
+ {
+ return array_pop($this->_stack);
+ }
+
+ public function peek($offset = 1)
+ {
+ if (isset($this->_stack[count($this->_stack) - $offset])) {
+ return $this->_stack[count($this->_stack) - $offset];
+ } else {
+ return null;
+ }
+ }
+
+}
* Initial Horde_Support_Array object
* Initial Horde_Support_ConsistentHash object
* Initial Horde_Support_Inflector object
+ * Initial Horde_Support_Stack object
* Initial Horde_Support_Stub object
* Initial Horde_Support_Timer object
* Initial Horde_Support_Uuid object
<file name="ConsistentHash.php" role="php" />
<file name="Inflector.php" role="php" />
<file name="Numerizer.php" role="php" />
+ <file name="Stack.php" role="php" />
<file name="Stub.php" role="php" />
<file name="Timer.php" role="php" />
<file name="Uuid.php" role="php" />
<install name="lib/Horde/Support/Numerizer/Locale/Base.php" as="Horde/Support/Numerizer/Locale/Base.php" />
<install name="lib/Horde/Support/Numerizer/Locale/De.php" as="Horde/Support/Numerizer/Locale/De.php" />
<install name="lib/Horde/Support/Numerizer.php" as="Horde/Support/Numerizer.php" />
+ <install name="lib/Horde/Support/Stack.php" as="Horde/Support/Stack.php" />
<install name="lib/Horde/Support/Stub.php" as="Horde/Support/Stub.php" />
<install name="lib/Horde/Support/Timer.php" as="Horde/Support/Timer.php" />
<install name="lib/Horde/Support/Uuid.php" as="Horde/Support/Uuid.php" />