SPL-StandardPHPLibrary
splstack.inc
Go to the documentation of this file.
1 <?php
2 
22 {
23  protected $_it_mode = parent::IT_MODE_LIFO;
24 
38  public function setIteratorMode($mode)
39  {
40  if ($mode & parent::IT_MODE_LIFO !== parent::IT_MODE_LIFO) {
41  throw new RuntimeException("Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen");
42  }
43 
44  $this->_it_mode = $mode;
45  }
46 }
47 
48 ?>
Implementation of a stack through a DoublyLinkedList.
Definition: splstack.inc:21
Doubly Linked List.
Exception thrown for errors that are only detectable at runtime.
Definition: spl.php:423
setIteratorMode($mode)
Changes the iteration mode.
Definition: splstack.inc:38