cvs: phpdoc-fr /reference/spl/functions ArrayIterator-rewind.xml ArrayObject-construct.xml ArrayObject-getIterator.xml
| From: | Damien Seguy | Date: | Thu, 22 Apr 2004 15:24:35 +0000 |
| Subject: | cvs: phpdoc-fr /reference/spl/functions ArrayIterator-rewind.xml ArrayObject-construct.xml ArrayObject-getIterator.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-2226@lists.php.net to get a copy of this message | ||
dams Thu Apr 22 11:24:35 2004 EDT
Modified files:
/phpdoc-fr/reference/spl/functions ArrayIterator-rewind.xml
ArrayObject-construct.xml
ArrayObject-getIterator.xml
Log:
synch with en tree
http://cvs.php.net/diff.php/phpdoc-fr/reference/spl/functions/ArrayIterator-rewind.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc-fr/reference/spl/functions/ArrayIterator-rewind.xml
diff -u phpdoc-fr/reference/spl/functions/ArrayIterator-rewind.xml:1.4
phpdoc-fr/reference/spl/functions/ArrayIterator-rewind.xml:1.5
--- phpdoc-fr/reference/spl/functions/ArrayIterator-rewind.xml:1.4 Thu Apr 22 10:21:01 2004
+++ phpdoc-fr/reference/spl/functions/ArrayIterator-rewind.xml Thu Apr 22 11:24:35 2004
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- EN-Revision: 1.1 Maintainer: didou Status: ready -->
<refentry id="function.arrayiterator-rewind">
<refnamediv>
@@ -14,10 +14,34 @@
<type>void</type><methodname>ArrayIterator::rewind</methodname>
<void/>
</methodsynopsis>
+ <para>
+ <function>ArrayIterator::rewind</function> remet l'itérateur
+ au début du cycle.
+ </para>
+ <para>
+ <example>
+ <title>Exemple avec <function>ArrayObject::rewind</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$arrayobject = new ArrayObject();
- &warn.undocumented.func;
+$arrayobject[] = 'zero';
+$arrayobject[] = 'one';
+$arrayobject[] = 'two';
- </refsect1>
+$iterator = $arrayobject->getIterator();
+
+$iterator->next();
+echo $iterator->key(); //1
+
+$iterator->rewind(); //retour au début
+echo $iterator->key(); //0
+?>
+]]>
+ </programlisting>
+ </example>
+ </para> </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/diff.php/phpdoc-fr/reference/spl/functions/ArrayObject-construct.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc-fr/reference/spl/functions/ArrayObject-construct.xml
diff -u phpdoc-fr/reference/spl/functions/ArrayObject-construct.xml:1.4
phpdoc-fr/reference/spl/functions/ArrayObject-construct.xml:1.5
--- phpdoc-fr/reference/spl/functions/ArrayObject-construct.xml:1.4 Thu Apr 22 10:21:01 2004
+++ phpdoc-fr/reference/spl/functions/ArrayObject-construct.xml Thu Apr 22 11:24:35 2004
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- EN-Revision: 1.1 Maintainer: didou Status: ready -->
<refentry id="function.arrayobject-construct">
<refnamediv>
@@ -14,9 +14,42 @@
<type>void</type><methodname>ArrayObject::__construct</methodname>
<methodparam><type>array|object</type><parameter>ar</parameter></methodparam>
</methodsynopsis>
+ <para>
+ <function>ArrayObject::__construct</function> construit un nouvel objet
+ tableau. Le paramètre <parameter>input</parameter> accepte
+ un tableau ou un autre objet ArrayObject.
+ </para>
+ <para>
+ <example>
+ <title>Exemple avec
<function>ArrayObject::__construct</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$array = array('1' => 'one',
+ '2' => 'two',
+ '3' => 'three');
- &warn.undocumented.func;
+$arrayobject = new ArrayObject($array);
+var_dump($arrayobject);
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+object(ArrayObject)#1 (3) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(5) "three"
+}
+]]>
+ </screen>
+ </example>
+ </para>
</refsect1>
</refentry>
http://cvs.php.net/diff.php/phpdoc-fr/reference/spl/functions/ArrayObject-getIterator.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc-fr/reference/spl/functions/ArrayObject-getIterator.xml
diff -u phpdoc-fr/reference/spl/functions/ArrayObject-getIterator.xml:1.4
phpdoc-fr/reference/spl/functions/ArrayObject-getIterator.xml:1.5
--- phpdoc-fr/reference/spl/functions/ArrayObject-getIterator.xml:1.4 Thu Apr 22 10:21:01 2004
+++ phpdoc-fr/reference/spl/functions/ArrayObject-getIterator.xml Thu Apr 22 11:24:35 2004
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- EN-Revision: 1.1 Maintainer: didou Status: ready -->
<refentry id="function.arrayobject-getiterator">
<refnamediv>
@@ -14,9 +14,42 @@
<type>ArrayIterator</type><methodname>ArrayObject::getIterator</methodname>
<void/>
</methodsynopsis>
+ <para>
+ <function>ArrayObject::getIterator</function> retourne un itérateur
+ à partir d'un objet de classe <classname>ArrayObject</classname>.
+ </para>
+ <para>
+ <example>
+ <title>Exemple avec
<function>ArrayObject::getIterator</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$array = array('1' => 'un',
+ '2' => 'deux',
+ '3' => 'trois');
- &warn.undocumented.func;
+$arrayobject = new ArrayObject($array);
+$iterator = $arrayobject->getIterator();
+
+while($iterator->valid()) {
+ echo $iterator->key() . ' => ' . $iterator->current() . "\n";
+
+ $iterator->next();
+}
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+1 => un
+2 => deux
+3 => trois
+]]>
+ </screen>
+ </example>
+ </para>
</refsect1>
</refentry>