cvs: phpdoc /en/reference/spl iterators.xml recursivearrayiterator.xml /en/reference/spl/recursivearrayiterator getchildren.xml haschildren.xml

From: Date: Fri, 03 Jul 2009 18:53:19 +0000
Subject: cvs: phpdoc /en/reference/spl iterators.xml recursivearrayiterator.xml /en/reference/spl/recursivearrayiterator getchildren.xml haschildren.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4325@lists.php.net to get a copy of this message
joris Fri Jul 3 18:53:19 2009 UTC Added files: /phpdoc/en/reference/spl recursivearrayiterator.xml /phpdoc/en/reference/spl/recursivearrayiterator haschildren.xml getchildren.xml Modified files: /phpdoc/en/reference/spl iterators.xml Log: Added documentation and examples for RecursiveArrayIterator

http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/spl/iterators.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/spl/iterators.xml diff -u phpdoc/en/reference/spl/iterators.xml:1.8 phpdoc/en/reference/spl/iterators.xml:1.9 --- phpdoc/en/reference/spl/iterators.xml:1.8 Tue Jun 30 03:13:56 2009 +++ phpdoc/en/reference/spl/iterators.xml Fri Jul 3 18:53:19 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <part xml:id="spl.iterators" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -14,7 +14,6 @@ <title>Undocumented Iterators</title> <simplelist> <member><classname>NoRewindIterator</classname></member> - <member><classname>RecursiveArrayIterator</classname></member> <member><classname>RecursiveFilterIterator</classname></member> <member><classname>RecursiveRegexIterator</classname></member> <member><classname>RecursiveTreeIterator</classname></member> @@ -26,7 +25,6 @@ <!-- TODO: Not documented &reference.spl.norewinditerator; - &reference.spl.recursivearrayiterator; &reference.spl.recursivefilteriterator; &reference.spl.recursiveregexiterator; &reference.spl.recursivetreeiterator; @@ -46,6 +44,7 @@ &reference.spl.limititerator; &reference.spl.multipleiterator; &reference.spl.parentiterator; + &reference.spl.recursivearrayiterator; &reference.spl.recursivecachingiterator; &reference.spl.recursivedirectoryiterator; &reference.spl.recursiveiteratoriterator; http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/spl/recursivearrayiterator.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/spl/recursivearrayiterator.xml +++ phpdoc/en/reference/spl/recursivearrayiterator.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <phpdoc:classref xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="class.recursivearrayiterator" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>The RecursiveArrayIterator class</title> <titleabbrev>RecursiveArrayIterator</titleabbrev> <partintro> <!-- {{{ RecursiveArrayIterator intro --> <section xml:id="recursivearrayiterator.intro"> &reftitle.intro; <para> This iterator allows to unset and modify values and keys while iterating over Arrays and Objects in the same way as the <type>ArrayIterator</type>. Additionally it is possible to iterate over the current iterator entry. </para> </section> <!-- }}} --> <section xml:id="recursivearrayiterator.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>RecursiveArrayIterator</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>RecursiveArrayIterator</classname> </ooclass> <ooclass> <modifier>extends</modifier> <classname>ArrayIterator</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> <oointerface> <interfacename>Iterator</interfacename> </oointerface> <oointerface> <interfacename>RecursiveIterator</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <!-- {{{ If the property is documented below (xml:id=recursivearrayiterator.props) use this <classsynopsisinfo role="comment">Properties</classsynopsisinfo> <fieldsynopsis> <modifier>public</modifier> <type>string</type> <varname linkend="recursivearrayiterator.props.name">name</varname> </fieldsynopsis> }}} --> <classsynopsisinfo role="comment">Methods</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.recursivearrayiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> <classsynopsisinfo role="comment">Inherits</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.arrayiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> </section> <!-- {{{ RecursiveArrayIterator properties <section xml:id="recursivearrayiterator.props"> &reftitle.properties; <variablelist> <varlistentry xml:id="recursivearrayiterator.props.name"> <term><varname>name</varname></term> <listitem> <para>Prop description</para> </listitem> </varlistentry> </variablelist> </section> }}} --> </partintro> &reference.spl.entities.recursivearrayiterator; </phpdoc:classref> <!-- 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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/spl/recursivearrayiterator/haschildren.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/spl/recursivearrayiterator/haschildren.xml +++ phpdoc/en/reference/spl/recursivearrayiterator/haschildren.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry xml:id="recursivearrayiterator.haschildren" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>RecursiveArrayIterator::hasChildren</refname> <refpurpose>Returns whether current entry is an array or an object.</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>RecursiveArrayIterator::hasChildren</methodname> <void/> </methodsynopsis> <para> Returns whether current entry is an <type>array</type> or an <type>object</type> for which an iterator can be obtained via <methodname>RecursiveArrayIterator::getChildren</methodname>. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; &no.function.parameters; </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns &true; if the current entry is an <type>array</type> or an <type>object</type>, otherwise &false; is returned. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>RecursiveArrayIterator::hasChildren</function> example</title> <programlisting role="php"> <![CDATA[ <?php $fruits = array("a" => "lemon", "b" => "orange", array("a" => "apple", "p" => "pear")); $iterator = new RecursiveArrayIterator($fruits); while ($iterator->valid()) { // Check if there are children if ($iterator->hasChildren()) { // print all children foreach ($iterator->getChildren() as $key => $value) { echo $key . ' : ' . $value . "\n"; } } else { echo "No children.\n"; } $iterator->next(); } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ No children. No children. a : apple p : pear ]]> </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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/spl/recursivearrayiterator/getchildren.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/spl/recursivearrayiterator/getchildren.xml +++ phpdoc/en/reference/spl/recursivearrayiterator/getchildren.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <refentry xml:id="recursivearrayiterator.getchildren" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>RecursiveArrayIterator::getChildren</refname> <refpurpose>Returns an iterator for the current entry if it is an <type>array</type> or an <type>object</type>.</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>RecursiveArrayIterator</type><methodname>RecursiveArrayIterator::getChildren</methodname> <void/> </methodsynopsis> <para> Returns an iterator for the current iterator entry. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; &no.function.parameters; </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> An iterator for the current entry, if it is an <type>array</type> or <type>object</type>. An <classname>InvalidArgumentException</classname> will be thrown if the current entry does not contain an <type>array</type> or an <type>object</type>. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>RecursiveArrayIterator::getChildren</function> example</title> <programlisting role="php"> <![CDATA[ <?php $fruits = array("a" => "lemon", "b" => "orange", array("a" => "apple", "p" => "pear")); $iterator = new RecursiveArrayIterator($fruits); while ($iterator->valid()) { if ($iterator->hasChildren()) { // print all children foreach ($iterator->getChildren() as $key => $value) { echo $key . ' : ' . $value . "\n"; } } else { echo "No children.\n"; } $iterator->next(); } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ No children. No children. a : apple p : pear ]]> </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 -->
« previous php.doc.cvs (#4325) next »