From 0264840fd565c28fc7c9890217d61923e443255a Mon Sep 17 00:00:00 2001 From: Etienne Kneuss <colder@php.net> Date: Mon, 12 May 2008 00:29:35 +0000 Subject: [PATCH] Initial docs for SplDoublyLinkedList, SplQueue and SplStack, with all files git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@259586 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../spl/spldoublylinkedlist/construct.xml | 92 ++++++++++++++ reference/spl/spldoublylinkedlist/count.xml | 50 ++++++++ reference/spl/spldoublylinkedlist/current.xml | 52 ++++++++ .../spldoublylinkedlist/getiteratormode.xml | 50 ++++++++ reference/spl/spldoublylinkedlist/isempty.xml | 50 ++++++++ reference/spl/spldoublylinkedlist/key.xml | 53 +++++++++ reference/spl/spldoublylinkedlist/next.xml | 53 +++++++++ .../spl/spldoublylinkedlist/offsetexists.xml | 61 ++++++++++ .../spl/spldoublylinkedlist/offsetget.xml | 61 ++++++++++ .../spl/spldoublylinkedlist/offsetset.xml | 73 ++++++++++++ .../spl/spldoublylinkedlist/offsetunset.xml | 65 ++++++++++ reference/spl/spldoublylinkedlist/pop.xml | 50 ++++++++ reference/spl/spldoublylinkedlist/push.xml | 64 ++++++++++ reference/spl/spldoublylinkedlist/rewind.xml | 53 +++++++++ .../spldoublylinkedlist/setiteratormode.xml | 81 +++++++++++++ reference/spl/spldoublylinkedlist/shift.xml | 50 ++++++++ reference/spl/spldoublylinkedlist/unshift.xml | 64 ++++++++++ reference/spl/spldoublylinkedlist/valid.xml | 53 +++++++++ reference/spl/splqueue/construct.xml | 112 ++++++++++++++++++ reference/spl/splqueue/dequeue.xml | 57 +++++++++ reference/spl/splqueue/enqueue.xml | 68 +++++++++++ reference/spl/splqueue/setiteratormode.xml | 81 +++++++++++++ reference/spl/splstack/construct.xml | 90 ++++++++++++++ reference/spl/splstack/setiteratormode.xml | 81 +++++++++++++ 24 files changed, 1564 insertions(+) create mode 100644 reference/spl/spldoublylinkedlist/construct.xml create mode 100644 reference/spl/spldoublylinkedlist/count.xml create mode 100644 reference/spl/spldoublylinkedlist/current.xml create mode 100644 reference/spl/spldoublylinkedlist/getiteratormode.xml create mode 100644 reference/spl/spldoublylinkedlist/isempty.xml create mode 100644 reference/spl/spldoublylinkedlist/key.xml create mode 100644 reference/spl/spldoublylinkedlist/next.xml create mode 100644 reference/spl/spldoublylinkedlist/offsetexists.xml create mode 100644 reference/spl/spldoublylinkedlist/offsetget.xml create mode 100644 reference/spl/spldoublylinkedlist/offsetset.xml create mode 100644 reference/spl/spldoublylinkedlist/offsetunset.xml create mode 100644 reference/spl/spldoublylinkedlist/pop.xml create mode 100644 reference/spl/spldoublylinkedlist/push.xml create mode 100644 reference/spl/spldoublylinkedlist/rewind.xml create mode 100644 reference/spl/spldoublylinkedlist/setiteratormode.xml create mode 100644 reference/spl/spldoublylinkedlist/shift.xml create mode 100644 reference/spl/spldoublylinkedlist/unshift.xml create mode 100644 reference/spl/spldoublylinkedlist/valid.xml create mode 100644 reference/spl/splqueue/construct.xml create mode 100644 reference/spl/splqueue/dequeue.xml create mode 100644 reference/spl/splqueue/enqueue.xml create mode 100644 reference/spl/splqueue/setiteratormode.xml create mode 100644 reference/spl/splstack/construct.xml create mode 100644 reference/spl/splstack/setiteratormode.xml diff --git a/reference/spl/spldoublylinkedlist/construct.xml b/reference/spl/spldoublylinkedlist/construct.xml new file mode 100644 index 0000000000..236ddeba09 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/construct.xml @@ -0,0 +1,92 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.construct" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::__construct</refname> + <refpurpose>Constructs a new doubly linked list</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <constructorsynopsis> + <methodname>SplDoublyLinkedList::__construct</methodname> + <void /> + </constructorsynopsis> + <para> + This constructs a new empty doubly linked list. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>SplDoublyLinkedList::__construct</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$dll = new SplDoublyLinkedList(); + +$dll->push(2); +$dll->push(3); +$dll->unshift(5); + +var_dump($dll); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +object(SplDoublyLinkedList)#1 (2) { + ["flags":"SplDoublyLinkedList":private]=> + int(0) + ["dllist":"SplDoublyLinkedList":private]=> + array(3) { + [0]=> + int(5) + [1]=> + int(2) + [2]=> + int(3) + } +} +]]> + </screen> + </example> + </para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/count.xml b/reference/spl/spldoublylinkedlist/count.xml new file mode 100644 index 0000000000..a5fcff56c6 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/count.xml @@ -0,0 +1,50 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.count" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::count</refname> + <refpurpose>Counts the number of elements in the doubly linked list.</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>SplDoublyLinkedList::count</methodname> + <void/> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the number of elements in the doubly linked list. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/current.xml b/reference/spl/spldoublylinkedlist/current.xml new file mode 100644 index 0000000000..92c4edee00 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/current.xml @@ -0,0 +1,52 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.current" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::current</refname> + <refpurpose>Return current array entry</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>SplDoublyLinkedList::current</methodname> + <void/> + </methodsynopsis> + <para> + Get the current doubly linked list node. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The current node value. + </para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/getiteratormode.xml b/reference/spl/spldoublylinkedlist/getiteratormode.xml new file mode 100644 index 0000000000..44c42cec64 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/getiteratormode.xml @@ -0,0 +1,50 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.getiteratormode" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::getIteratorMode</refname> + <refpurpose>Returns the mode of iteration</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>SplDoublyLinkedList::getIteratorMode</methodname> + <void/> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the different modes and flags that affect the iteration. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/isempty.xml b/reference/spl/spldoublylinkedlist/isempty.xml new file mode 100644 index 0000000000..6cad05ffde --- /dev/null +++ b/reference/spl/spldoublylinkedlist/isempty.xml @@ -0,0 +1,50 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.isempty" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::isEmpty</refname> + <refpurpose>Checks whether the doubly linked list is empty.</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>SplDoublyLinkedList::isEmpty</methodname> + <void/> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns whether the doubly linked list is empty. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/key.xml b/reference/spl/spldoublylinkedlist/key.xml new file mode 100644 index 0000000000..a6f04f8b77 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/key.xml @@ -0,0 +1,53 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.key" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::key</refname> + <refpurpose>Return current node index</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>SplDoublyLinkedList::key</methodname> + <void/> + </methodsynopsis> + <para> + This function returns the current node index + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The current node index. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/next.xml b/reference/spl/spldoublylinkedlist/next.xml new file mode 100644 index 0000000000..cfc0a24574 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/next.xml @@ -0,0 +1,53 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.next" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::next</refname> + <refpurpose>Move to next entry</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::next</methodname> + <void/> + </methodsynopsis> + <para> + Move the iterator to the next node. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/offsetexists.xml b/reference/spl/spldoublylinkedlist/offsetexists.xml new file mode 100644 index 0000000000..822766898c --- /dev/null +++ b/reference/spl/spldoublylinkedlist/offsetexists.xml @@ -0,0 +1,61 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.offsetexists" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::offsetExists</refname> + <refpurpose>Returns whether the requested $index exists</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>SplDoublyLinkedList::offsetExists</methodname> + <methodparam><type>mixed</type><parameter>index</parameter></methodparam> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>index</parameter></term> + <listitem> + <para> + The index being checked. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &true; if the requested <parameter>index</parameter> exists, otherwise &false; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/offsetget.xml b/reference/spl/spldoublylinkedlist/offsetget.xml new file mode 100644 index 0000000000..1ffc24dc9b --- /dev/null +++ b/reference/spl/spldoublylinkedlist/offsetget.xml @@ -0,0 +1,61 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.offsetget" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::offsetGet</refname> + <refpurpose>Returns the value at the specified $index</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>SplDoublyLinkedList::offsetGet</methodname> + <methodparam><type>mixed</type><parameter>index</parameter></methodparam> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>index</parameter></term> + <listitem> + <para> + The index with the value. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The value at the specified <parameter>index</parameter>. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/offsetset.xml b/reference/spl/spldoublylinkedlist/offsetset.xml new file mode 100644 index 0000000000..95229c0582 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/offsetset.xml @@ -0,0 +1,73 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.offsetset" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::offsetSet</refname> + <refpurpose>Sets the value at the specified $index to $newval</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::offsetSet</methodname> + <methodparam><type>mixed</type><parameter>index</parameter></methodparam> + <methodparam><type>mixed</type><parameter>newval</parameter></methodparam> + </methodsynopsis> + + <para> + Sets the value at the specified <parameter>index</parameter> to <parameter>newval</parameter>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>index</parameter></term> + <listitem> + <para> + The index being set. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>newval</parameter></term> + <listitem> + <para> + The new value for the <parameter>index</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/offsetunset.xml b/reference/spl/spldoublylinkedlist/offsetunset.xml new file mode 100644 index 0000000000..3665f21fbe --- /dev/null +++ b/reference/spl/spldoublylinkedlist/offsetunset.xml @@ -0,0 +1,65 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.offsetunset" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::offsetUnset</refname> + <refpurpose>Unsets the value at the specified $index</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::offsetUnset</methodname> + <methodparam><type>mixed</type><parameter>index</parameter></methodparam> + </methodsynopsis> + + <para> + Unsets the value at the specified index. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>index</parameter></term> + <listitem> + <para> + The index being unset. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/pop.xml b/reference/spl/spldoublylinkedlist/pop.xml new file mode 100644 index 0000000000..fbf1ecec9b --- /dev/null +++ b/reference/spl/spldoublylinkedlist/pop.xml @@ -0,0 +1,50 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.pop" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::pop</refname> + <refpurpose>Pops a node from then end of the doubly linked list</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>SplDoublyLinkedList::pop</methodname> + <void /> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The value of the popped node. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/push.xml b/reference/spl/spldoublylinkedlist/push.xml new file mode 100644 index 0000000000..f79dd20382 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/push.xml @@ -0,0 +1,64 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.push" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::push</refname> + <refpurpose>Pushes an element at the end of the doubly linked list</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::push</methodname> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + </methodsynopsis> + + <para> + Pushes <parameter>value</parameter> at the end of the doubly linked list. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para> + The value to push. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/rewind.xml b/reference/spl/spldoublylinkedlist/rewind.xml new file mode 100644 index 0000000000..afc37a9ebd --- /dev/null +++ b/reference/spl/spldoublylinkedlist/rewind.xml @@ -0,0 +1,53 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.rewind" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::rewind</refname> + <refpurpose>Rewind iterator back to the start</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::rewind</methodname> + <void/> + </methodsynopsis> + <para> + This rewinds the iterator to the beginning. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/setiteratormode.xml b/reference/spl/spldoublylinkedlist/setiteratormode.xml new file mode 100644 index 0000000000..f7106a85f6 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/setiteratormode.xml @@ -0,0 +1,81 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.setiteratormode" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::setIteratorMode</refname> + <refpurpose>Sets the mode of iteration</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::setIteratorMode</methodname> + <methodparam><type>int</type><parameter>mode</parameter></methodparam> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + There are two orthogonal sets of modes that can be set: + </para> + <itemizedlist> + <listitem> + <simpara>The direction of the iteration (either one or the other):</simpara> + <itemizedlist> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_LIFO (Stack style)</simpara></listitem> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_FIFO (Queue style)</simpara></listitem> + </itemizedlist> + </listitem> + <listitem> + <simpara>The behavior of the iterator (either one or the other):</simpara> + <itemizedlist> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_DELETE (Elements are deleted by the iterator)</simpara></listitem> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_KEEP (Elements are traversed by the iterator)</simpara></listitem> + </itemizedlist> + </listitem> + </itemizedlist> + + <para> + The default mode is 0 : SplDoublyLnkedList::IT_MODE_FIFO | SplDoublyLnkedList::IT_MODE_KEEP + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/shift.xml b/reference/spl/spldoublylinkedlist/shift.xml new file mode 100644 index 0000000000..552e26b980 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/shift.xml @@ -0,0 +1,50 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.shift" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::shift</refname> + <refpurpose>Shifts a node from the beginning of the doubly linked list</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>SplDoublyLinkedList::shift</methodname> + <void /> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The value of the shifted node. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/unshift.xml b/reference/spl/spldoublylinkedlist/unshift.xml new file mode 100644 index 0000000000..c0a2d760ae --- /dev/null +++ b/reference/spl/spldoublylinkedlist/unshift.xml @@ -0,0 +1,64 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.unshift" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::unshift</refname> + <refpurpose>Prepends the doubly linked list with an element</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplDoublyLinkedList::unshift</methodname> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + </methodsynopsis> + + <para> + Prepends <parameter>value</parameter> at the beginning of the doubly linked list. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para> + The value to unshift. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/spldoublylinkedlist/valid.xml b/reference/spl/spldoublylinkedlist/valid.xml new file mode 100644 index 0000000000..a7b4c2fd37 --- /dev/null +++ b/reference/spl/spldoublylinkedlist/valid.xml @@ -0,0 +1,53 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="spldoublylinkedlist.valid" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplDoublyLinkedList::valid</refname> + <refpurpose>Check whether the doubly linked list contains more entries</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>SplDoublyLinkedList::valid</methodname> + <void/> + </methodsynopsis> + <para> + Checks if the doubly linked list contains any more nodes. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the doubly linked list contains any more nodes, &false; otherwise. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/splqueue/construct.xml b/reference/spl/splqueue/construct.xml new file mode 100644 index 0000000000..7fdf9a3e31 --- /dev/null +++ b/reference/spl/splqueue/construct.xml @@ -0,0 +1,112 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="splqueue.construct" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplQueue::__construct</refname> + <refpurpose>Constructs a new queue implemented using a doubly linked list</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <constructorsynopsis> + <methodname>SplQueue::__construct</methodname> + <void/> + </constructorsynopsis> + <para> + This constructs a new empty queue. + <note> + <para> + This method automatically sets the iterator mode to + SplDoublyLinkedList::IT_MODE_FIFO. + </para> + </note> + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>SplQueue::__construct</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$q = new SplQueue(); + +$q[] = 1; +$q[] = 2; +$q[] = 3; + +foreach ($q as $elem) { + echo $elem."\n"; +} +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +1 +2 +3 +]]> + </screen> + </example> + <example> + <title>Efficiently handling tasks with <classname>SplQueue</classname></title> + <programlisting role="php"> +<![CDATA[ +<?php +$q = new SplQueue(); +$q->setIteratorMode(SplQueue::IT_MODE_DELETE); + +// ... enqueue some tasks on the queue ... + +// process them +foreach ($q as $task) { + // ... process $task ... + + // add new tasks on the queue + $q[] = $newTask; + // ... +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/splqueue/dequeue.xml b/reference/spl/splqueue/dequeue.xml new file mode 100644 index 0000000000..749e9f9209 --- /dev/null +++ b/reference/spl/splqueue/dequeue.xml @@ -0,0 +1,57 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="splqueue.dequeue" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplQueue::dequeue</refname> + <refpurpose>Dequeues a node from the queue</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>SplQueue::dequeue</methodname> + <void /> + </methodsynopsis> + <para> + Dequeues <parameter>value</parameter> from the top of of the queue. + </para> + <note> + <para> + <methodname>SplQueue::dequeue</methodname> is an alias of <methodname>SplDoublyLinkedList::shift</methodname>. + </para> + </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The value of the dequeued node. + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/splqueue/enqueue.xml b/reference/spl/splqueue/enqueue.xml new file mode 100644 index 0000000000..f73fd96c98 --- /dev/null +++ b/reference/spl/splqueue/enqueue.xml @@ -0,0 +1,68 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="splqueue.enqueue" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplQueue::enqueue</refname> + <refpurpose>Adds an element to the queue.</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplQueue::enqueue</methodname> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + </methodsynopsis> + + <para> + Enqueues <parameter>value</parameter> at the end of the queue. + </para> + <note> + <para> + <methodname>SplQueue::enqueue</methodname> is an alias of <methodname>SplDoublyLinkedList::push</methodname>. + </para> + </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para> + The value to enqueue. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/splqueue/setiteratormode.xml b/reference/spl/splqueue/setiteratormode.xml new file mode 100644 index 0000000000..251730b6a4 --- /dev/null +++ b/reference/spl/splqueue/setiteratormode.xml @@ -0,0 +1,81 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="splqueue.setiteratormode" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplQueue::setIteratorMode</refname> + <refpurpose>Sets the mode of iteration</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplQueue::setIteratorMode</methodname> + <methodparam><type>int</type><parameter>mode</parameter></methodparam> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + There is only one iteration parameter you can modify. + </para> + <itemizedlist> + <listitem> + <simpara>The behavior of the iterator (either one or the other):</simpara> + <itemizedlist> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_DELETE (Elements are deleted by the iterator)</simpara></listitem> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_KEEP (Elements are traversed by the iterator)</simpara></listitem> + </itemizedlist> + </listitem> + </itemizedlist> + + <para> + The default mode is 0x0 : SplDoublyLnkedList::IT_MODE_FIFO | SplDoublyLnkedList::IT_MODE_KEEP + </para> + + <warning> + <para> + The direction of iteration can no longer be changer for SplQueues. + Trying to do so will result in a RuntimeException being thrown. + </para> + </warning> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/splstack/construct.xml b/reference/spl/splstack/construct.xml new file mode 100644 index 0000000000..c2942d4364 --- /dev/null +++ b/reference/spl/splstack/construct.xml @@ -0,0 +1,90 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="splstack.construct" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplStack::__construct</refname> + <refpurpose>Constructs a new stack implemented using a doubly linked list</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <constructorsynopsis> + <methodname>SplStack::__construct</methodname> + <void/> + </constructorsynopsis> + <para> + This constructs a new empty stack. + <note> + <para> + This method automatically sets the iterator mode to + SplDoublyLinkedList::IT_MODE_LIFO. + </para> + </note> + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>SplStack::__construct</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$q = new SplStack(); + +$q[] = 1; +$q[] = 2; +$q[] = 3; + +foreach ($q as $elem) { + echo $elem."\n"; +} +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +3 +2 +1 +]]> + </screen> + </example> + </para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/spl/splstack/setiteratormode.xml b/reference/spl/splstack/setiteratormode.xml new file mode 100644 index 0000000000..02d55afee0 --- /dev/null +++ b/reference/spl/splstack/setiteratormode.xml @@ -0,0 +1,81 @@ +<?xml version='1.0' encoding='iso-8859-1'?> +<!-- $Revision: 1.1 $ --> +<refentry xml:id="splstack.setiteratormode" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>SplStack::setIteratorMode</refname> + <refpurpose>Sets the mode of iteration</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>void</type><methodname>SplStack::setIteratorMode</methodname> + <methodparam><type>int</type><parameter>mode</parameter></methodparam> + </methodsynopsis> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + There is only one iteration parameter you can modify. + </para> + <itemizedlist> + <listitem> + <simpara>The behavior of the iterator (either one or the other):</simpara> + <itemizedlist> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_DELETE (Elements are deleted by the iterator)</simpara></listitem> + <listitem><simpara>SplDoublyLnkedList::IT_MODE_KEEP (Elements are traversed by the iterator)</simpara></listitem> + </itemizedlist> + </listitem> + </itemizedlist> + + <para> + The default mode is 0x2 : SplDoublyLnkedList::IT_MODE_LIFO | SplDoublyLnkedList::IT_MODE_KEEP + </para> + + <warning> + <para> + The direction of iteration can no longer be changer for SplStacks. + Trying to do so will result in a RuntimeException being thrown. + </para> + </warning> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +-->