LinkedList::setIteratorMode

(Available since version 1.0)

LinkedList::setIteratorModeSets the mode of iteration

Description

public int LinkedList::setIteratorMode ( int $mode )

Note:

This method deviates from SplDoublyLinkedList::setIteratorMode() in that it will not accept the LIFO flag.

Note:

The default mode is: LinkedList::IT_MODE_KEEP

Parameters

mode

Either LinkedList::IT_MODE_DELETE (Elements are deleted by the iterator) or LinkedList::IT_MODE_KEEP (Elements are traversed by the iterator).

Return Values

The new iterator mode.

Errors/Exceptions

Throws SEIDS::LinkedLists::ModeNotSupportedException when the LIFO flag is present in mode.

To Top