SPL-StandardPHPLibrary
splqueue.inc
Go to the documentation of this file.
00001 <?php
00002 
00025 class SplQueue extends SplDoublyLinkedList
00026 {
00027     protected $_it_mode = parent::IT_MODE_FIFO;
00028 
00042     public function setIteratorMode($mode)
00043     {
00044         if ($mode & parent::IT_MODE_LIFO === parent::IT_MODE_LIFO) {
00045             throw new RuntimeException("Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen");
00046         }
00047 
00048         $this->_it_mode = $mode;
00049     }
00050 
00055     public function dequeue()
00056     {
00057         return parent::shift();
00058     }
00059 
00065     public function enqueue($data)
00066     {
00067         return parent::push($data);
00068     }
00069 }
00070 
00071 ?>