Tidied SplQueue::setIteratorMode; labeled constants, changed wording on LIFO warning, added errors section.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@283193 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Peter Cowburn 2009-06-30 18:26:45 +00:00
parent d9e8437a2a
commit 74cb2ecdd1

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry xml:id="splqueue.setiteratormode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SplQueue::setIteratorMode</refname>
@ -28,20 +28,19 @@
<listitem>
<simpara>The behavior of the iterator (either one or the other):</simpara>
<itemizedlist>
<listitem><simpara>SplDoublyLinkedList::IT_MODE_DELETE (Elements are deleted by the iterator)</simpara></listitem>
<listitem><simpara>SplDoublyLinkedList::IT_MODE_KEEP (Elements are traversed by the iterator)</simpara></listitem>
<listitem><simpara><constant>SplDoublyLinkedList::IT_MODE_DELETE</constant> (Elements are deleted by the iterator)</simpara></listitem>
<listitem><simpara><constant>SplDoublyLinkedList::IT_MODE_KEEP</constant> (Elements are traversed by the iterator)</simpara></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<para>
The default mode is 0x0 : SplDoublyLinkedList::IT_MODE_FIFO | SplDoublyLinkedList::IT_MODE_KEEP
The default mode is: <constant>SplDoublyLinkedList::IT_MODE_FIFO</constant> | <constant>SplDoublyLinkedList::IT_MODE_KEEP</constant>
</para>
<warning>
<para>
The direction of iteration can no longer be changer for SplQueues.
Trying to do so will result in a <classname>RuntimeException</classname> being thrown.
The direction of iteration can not be changed for SplQueues, it is always <constant>SplDoublyLinkedList::IT_MODE_FIFO</constant>.
</para>
</warning>
</listitem>
@ -57,6 +56,13 @@
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Throws a <classname>RuntimeException</classname> on trying to change the direction of iteration by using <constant>SplDoublyLinkedList::IT_MODE_LIFO</constant>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file