|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| bottom () | |
| count () | |
| current () | |
| getIteratorMode () | |
| isEmpty () | |
| key () | |
| next () | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
| pop () | |
| push ($data) | |
| rewind () | |
| setIteratorMode ($mode) | |
| shift () | |
| top () | |
| unshift ($data) | |
| valid () | |
Public Attributes | |
| const | IT_MODE_DELETE = 0x00000001 |
| const | IT_MODE_FIFO = 0x00000000 |
| const | IT_MODE_KEEP = 0x00000000 |
| const | IT_MODE_LIFO = 0x00000002 |
Protected Attributes | |
| $_it_mode = 0 | |
| $_it_pos = 0 | |
| $_llist = array() | |
Doubly Linked List.
The SplDoublyLinkedList class provides the main functionalities of a doubly linked list (DLL).
Definition at line 22 of file spldoublylinkedlist.inc.
| SplDoublyLinkedList::bottom | ( | ) |
Definition at line 97 of file spldoublylinkedlist.inc.
| SplDoublyLinkedList::count | ( | ) |
Implements Countable.
Definition at line 104 of file spldoublylinkedlist.inc.
Referenced by isEmpty(), offsetGet(), offsetSet(), offsetUnset(), pop(), rewind(), and shift().
| SplDoublyLinkedList::current | ( | ) |
Implements Iterator.
Definition at line 170 of file spldoublylinkedlist.inc.
References $_it_pos.
| SplDoublyLinkedList::getIteratorMode | ( | ) |
Definition at line 138 of file spldoublylinkedlist.inc.
References $_it_mode.
| SplDoublyLinkedList::isEmpty | ( | ) |
Definition at line 111 of file spldoublylinkedlist.inc.
References count().

| SplDoublyLinkedList::key | ( | ) |
Implements Iterator.
Definition at line 163 of file spldoublylinkedlist.inc.
References $_it_pos.
| SplDoublyLinkedList::next | ( | ) |
Forward to next element.
Implements Iterator.
Definition at line 177 of file spldoublylinkedlist.inc.
References pop(), and shift().

| SplDoublyLinkedList::offsetExists | ( | $offset | ) |
| $offset | The offset |
| OutOfRangeException | If the offset is either invalid or out of range. |
Implements ArrayAccess.
Definition at line 199 of file spldoublylinkedlist.inc.
| SplDoublyLinkedList::offsetGet | ( | $offset | ) |
| $offset | The offset |
| OutOfRangeException | If the offset is either invalid or out of range. |
Implements ArrayAccess.
Definition at line 214 of file spldoublylinkedlist.inc.
References count().

| SplDoublyLinkedList::offsetSet | ( | $offset, | |
| $value | |||
| ) |
Defines the data at a certain offset in the DLL.
| $offset | The offset |
| $value | New value |
| OutOfRangeException | If the offset is either invalid or out of range. |
Implements ArrayAccess.
Definition at line 236 of file spldoublylinkedlist.inc.
References count(), and push().

| SplDoublyLinkedList::offsetUnset | ( | $offset | ) |
Unsets the element at a certain offset in the DLL.
| $offset | The offset |
| OutOfRangeException | If the offset is either invalid or out of range. |
Implements ArrayAccess.
Definition at line 261 of file spldoublylinkedlist.inc.
References count().

| SplDoublyLinkedList::pop | ( | ) |
| RuntimeException | If the datastructure is empty. |
Definition at line 51 of file spldoublylinkedlist.inc.
References count().
Referenced by next().

| SplDoublyLinkedList::push | ( | $data | ) |
Pushes an element to the end of the DLL.
| $data | variable to add to the DLL. |
Definition at line 73 of file spldoublylinkedlist.inc.
Referenced by offsetSet().
| SplDoublyLinkedList::rewind | ( | ) |
Rewind to top iterator as set in constructor.
Implements Iterator.
Definition at line 145 of file spldoublylinkedlist.inc.
References count().

| SplDoublyLinkedList::setIteratorMode | ( | $mode | ) |
Changes the iteration mode.
There are two orthogonal sets of modes that can be set:
The default mode is 0 : SplDoublyLnkedList::IT_MODE_FIFO | SplDoublyLnkedList::IT_MODE_KEEP
| $mode | new mode of iteration |
Definition at line 130 of file spldoublylinkedlist.inc.
| SplDoublyLinkedList::shift | ( | ) |
| RuntimeException | If the datastructure is empty. |
Definition at line 62 of file spldoublylinkedlist.inc.
References count().
Referenced by next().

| SplDoublyLinkedList::top | ( | ) |
Definition at line 90 of file spldoublylinkedlist.inc.
| SplDoublyLinkedList::unshift | ( | $data | ) |
Adds an element to the beginning of the DLL.
| $data | variable to add to the DLL. |
Definition at line 82 of file spldoublylinkedlist.inc.
| SplDoublyLinkedList::valid | ( | ) |
Implements Iterator.
Definition at line 156 of file spldoublylinkedlist.inc.
|
protected |
Definition at line 25 of file spldoublylinkedlist.inc.
Referenced by getIteratorMode().
|
protected |
Definition at line 26 of file spldoublylinkedlist.inc.
|
protected |
Definition at line 24 of file spldoublylinkedlist.inc.
| const SplDoublyLinkedList::IT_MODE_DELETE = 0x00000001 |
| const SplDoublyLinkedList::IT_MODE_FIFO = 0x00000000 |
| const SplDoublyLinkedList::IT_MODE_KEEP = 0x00000000 |
| const SplDoublyLinkedList::IT_MODE_LIFO = 0x00000002 |
1.8.5