SPL-StandardPHPLibrary
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
internal
splstack.inc
Go to the documentation of this file.
1
<?php
2
21
class
SplStack
extends
SplDoublyLinkedList
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
?>
SplStack
Implementation of a stack through a DoublyLinkedList.
Definition:
splstack.inc:21
SplStack\$_it_mode
$_it_mode
Definition:
splstack.inc:23
SplDoublyLinkedList
Doubly Linked List.
Definition:
spldoublylinkedlist.inc:22
RuntimeException
Exception thrown for errors that are only detectable at runtime.
Definition:
spl.php:423
SplStack\setIteratorMode
setIteratorMode($mode)
Changes the iteration mode.
Definition:
splstack.inc:38
Generated on Wed Dec 4 2013 21:25:51 for SPL-StandardPHPLibrary by
1.8.5