cvs: phpdoc-fr /language/predefined arrayaccess.xml interfaces.xml iterator.xml iteratoraggregate.xml serializable.xml traversable.xml
| From: | Yannick Torres | Date: | Fri, 02 Jan 2009 22:19:02 +0000 |
| Subject: | cvs: phpdoc-fr /language/predefined arrayaccess.xml interfaces.xml iterator.xml iteratoraggregate.xml serializable.xml traversable.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-6246@lists.php.net to get a copy of this message | ||
yannick Fri Jan 2 22:19:02 2009 UTC
Added files:
/phpdoc-fr/language/predefined arrayaccess.xml interfaces.xml
iteratoraggregate.xml iterator.xml
serializable.xml traversable.xml
Log:
initial translation
http://cvs.php.net/viewvc.cgi/phpdoc-fr/language/predefined/arrayaccess.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/arrayaccess.xml +++ phpdoc-fr/language/predefined/arrayaccess.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.arrayaccess" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface ArrayAccess</title> <titleabbrev>ArrayAccess</titleabbrev> <partintro> <!-- {{{ ArrayAccess intro --> <section xml:id="arrayaccess.intro"> &reftitle.intro; <para> Interface permettant d'accéder aux objets de la même façon que pour les tableaux. </para> </section> <!-- }}} --> <section xml:id="arrayaccess.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>ArrayAccess</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>ArrayAccess</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.arrayaccess')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="arrayaccess.examples"> <example xml:id="arrayaccess.example.basic"><!-- {{{ --> <title>Basic usage</title> <programlisting role="php"> <![CDATA[ <?php class obj implements arrayaccess { private $container = array(); public function __construct() { $this->container = array( "un" => 1, "deux" => 2, "trois" => 3, ); } public function offsetSet($offset, $value) { $this->container[$offset] = $value; } public function offsetExists($offset) { return isset($this->container[$offset]); } public function offsetUnset($offset) { unset($this->container[$offset]); } public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } } $obj = new obj; var_dump(isset($obj["deux"])); var_dump($obj["deux"]); unset($obj["deux"]); var_dump(isset($obj["deux"])); $obj["deux"] = "Une valeur"; var_dump($obj["deux"]); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ bool(true) int(2) bool(false) string(7) "A value" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.arrayaccess.offsetexists; &language.predefined.arrayaccess.offsetget; &language.predefined.arrayaccess.offsetset; &language.predefined.arrayaccess.offsetunset; </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-fr/language/predefined/interfaces.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/interfaces.xml +++ phpdoc-fr/language/predefined/interfaces.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <part xml:id="reserved.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Interfaces prédéfinies</title> &language.predefined.traversable; &language.predefined.iterator; &language.predefined.iteratoraggregate; &language.predefined.arrayaccess; &language.predefined.serializable; </part> <!-- 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-fr/language/predefined/iteratoraggregate.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/iteratoraggregate.xml +++ phpdoc-fr/language/predefined/iteratoraggregate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.iteratoraggregate" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface IteratorAggregate</title> <titleabbrev>IteratorAggregate</titleabbrev> <partintro> <!-- {{{ IteratorAggregate intro --> <section xml:id="iteratoraggregate.intro"> &reftitle.intro; <para> Interface pour créer un itérateur externe. </para> </section> <!-- }}} --> <section xml:id="iteratoraggregate.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>IteratorAggregate</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>IteratorAggregate</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iteratoraggregate')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="iteratoraggregate.examples"> <example xml:id="iteratoraggregate.example.basic"><!-- {{{ --> <title>Basic usage</title> <programlisting role="php"> <![CDATA[ <?php class myData implements IteratorAggregate { public $property1 = "Propriété publique numéro un"; public $property2 = "Propriété publique numéro deux"; public $property3 = "Propriété publique numéro trois"; public function __construct() { $this->property4 = "dernière propriété"; } public function getIterator() { return new ArrayIterator($this); } } $obj = new myData; foreach($obj as $key => $value) { var_dump($key, $value); echo "\n"; } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(9) "property1" string(19) "Propriété publique numéro un" string(9) "property2" string(19) "Propriété publique numéro deux" string(9) "property3" string(21) "Propriété publique numéro trois" string(9) "property4" string(13) "dernière propriété" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.iteratoraggregate.getiterator; </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-fr/language/predefined/iterator.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/iterator.xml +++ phpdoc-fr/language/predefined/iterator.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.iterator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface Iterator</title> <titleabbrev>Iterator</titleabbrev> <partintro> <!-- {{{ Iterator intro --> <section xml:id="iterator.intro"> &reftitle.intro; <para> Interface pour les itérateurs ou les objets externes qui peuvent être itérés eux-mêmes en interne. </para> </section> <!-- }}} --> <section xml:id="iterator.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Iterator</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Iterator</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="iterator.examples"> <example xml:id="iterator.example.basic"><!-- {{{ --> <title>Exemple simple</title> <para> Cet exemple montre l'ordre d'appel des méthodes lors d'un appel à l'instruction <function>foreach</function> sur un itérateur. </para> <programlisting role="php"> <![CDATA[ <?php class myIterator implements Iterator { private $position = 0; private $array = array( "premierelement", "secondelement", "dernierelement", ); public function __construct() { $this->position = 0; } function rewind() { var_dump(__METHOD__); $this->position = 0; } function current() { var_dump(__METHOD__); return $this->array[$this->position]; } function key() { var_dump(__METHOD__); return $this->position; } function next() { var_dump(__METHOD__); ++$this->position; } function valid() { var_dump(__METHOD__); return isset($this->array[$this->position]); } } $it = new myIterator; foreach($it as $key => $value) { var_dump($key, $value); echo "\n"; } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(18) "myIterator::rewind" string(17) "myIterator::valid" string(19) "myIterator::current" string(15) "myIterator::key" int(0) string(12) "premierelement" string(16) "myIterator::next" string(17) "myIterator::valid" string(19) "myIterator::current" string(15) "myIterator::key" int(1) string(13) "secondelement" string(16) "myIterator::next" string(17) "myIterator::valid" string(19) "myIterator::current" string(15) "myIterator::key" int(2) string(11) "dernierelement" string(16) "myIterator::next" string(17) "myIterator::valid" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.iterator.current; &language.predefined.iterator.key; &language.predefined.iterator.next; &language.predefined.iterator.rewind; &language.predefined.iterator.valid; </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-fr/language/predefined/serializable.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/serializable.xml +++ phpdoc-fr/language/predefined/serializable.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.serializable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface Serializable</title> <titleabbrev>Serializable</titleabbrev> <partintro> <!-- {{{ Serializable intro --> <section xml:id="serializable.intro"> &reftitle.intro; <para> Interface permettant de personnaliser la linéarisation. </para> <para> Les classes implémentant cette interface ne supportent plus <link linkend="language.oop5.magic.sleep">__sleep()</link> et <link linkend="language.oop5.magic.sleep">__wakeup()</link>. La méthode de linéarisation est appelée chaque fois qu'une instance doit être linéarisée. Elle n'appelle pas la méthode __destruct() et n'a aucun effet sur le contenu de cette méthode. Lorsque les données sont linéarisées, la classe est connue et la méthode unserialize() appropriée est appelée comme constructeur au lieu d'appeler __construct(). Si vous devez appeler le constructeur standard, vous pouvez le faire dans la méthode. </para> </section> <!-- }}} --> <section xml:id="serializable.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Serializable</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Serializable</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.serializable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="serializable.examples"> <example xml:id="serializable.example.basic"><!-- {{{ --> <title>Basic usage</title> <programlisting role="php"> <![CDATA[ <?php class obj implements Serializable { private $data; public function __construct() { $this->data = "Mes données privées"; } public function serialize() { return serialize($this->data); } public function unserialize($data) { $this->data = unserialize($data); } public function getData() { return $this->data; } } $obj = new obj; $ser = serialize($obj); $newobj = unserialize($ser); var_dump($newobj->getData()); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(15) "Mes données privées" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.serializable.serialize; &language.predefined.serializable.unserialize; </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-fr/language/predefined/traversable.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/traversable.xml +++ phpdoc-fr/language/predefined/traversable.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.traversable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface Traversable</title> <titleabbrev>Traversable</titleabbrev> <partintro> <!-- {{{ Traversable intro --> <section xml:id="traversable.intro"> &reftitle.intro; <para> Interface permettant de détecter si une classe peut être parcourue en utilisant <function>foreach</function>. </para> <para> L'interface de base d'abstraction ne peut être implémentée seule. Elle doit être implémentée par soit <classname>IteratorAggregate</classname>, soit <classname>Iterator</classname>. </para> <note> <para> Les classes internes qui implémentent cette interface peuvent être utilisées dans une constructeur <function>foreach</function> et n'ont pas besoin d'implémenter <classname>IteratorAggregate</classname> ou <classname>Iterator</classname>. </para> </note> <note> <para> Ceci est une interface du moteur interne qui ne peut être implémentée dans des scripts PHP. Vous devez utiliser à la place <classname>IteratorAggregate</classname> ou <classname>Iterator</classname>. </para> </note> </section> <!-- }}} --> <section xml:id="traversable.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Traversable</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Traversable</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> </classsynopsis> <!-- }}} --> <para> Cette interface n'a pas de méthode ; son seul but est d'être l'interface de base pour toutes les classes permettant de parcourir des objets. </para> </section> </partintro> </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-fr/language/predefined/arrayaccess.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/arrayaccess.xml +++ phpdoc-fr/language/predefined/arrayaccess.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.arrayaccess" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface ArrayAccess</title> <titleabbrev>ArrayAccess</titleabbrev> <partintro> <!-- {{{ ArrayAccess intro --> <section xml:id="arrayaccess.intro"> &reftitle.intro; <para> Interface permettant d'accéder aux objets de la même façon que pour les tableaux. </para> </section> <!-- }}} --> <section xml:id="arrayaccess.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>ArrayAccess</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>ArrayAccess</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.arrayaccess')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="arrayaccess.examples"> <example xml:id="arrayaccess.example.basic"><!-- {{{ --> <title>Basic usage</title> <programlisting role="php"> <![CDATA[ <?php class obj implements arrayaccess { private $container = array(); public function __construct() { $this->container = array( "un" => 1, "deux" => 2, "trois" => 3, ); } public function offsetSet($offset, $value) { $this->container[$offset] = $value; } public function offsetExists($offset) { return isset($this->container[$offset]); } public function offsetUnset($offset) { unset($this->container[$offset]); } public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } } $obj = new obj; var_dump(isset($obj["deux"])); var_dump($obj["deux"]); unset($obj["deux"]); var_dump(isset($obj["deux"])); $obj["deux"] = "Une valeur"; var_dump($obj["deux"]); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ bool(true) int(2) bool(false) string(7) "A value" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.arrayaccess.offsetexists; &language.predefined.arrayaccess.offsetget; &language.predefined.arrayaccess.offsetset; &language.predefined.arrayaccess.offsetunset; </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-fr/language/predefined/interfaces.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/interfaces.xml +++ phpdoc-fr/language/predefined/interfaces.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <part xml:id="reserved.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Interfaces prédéfinies</title> &language.predefined.traversable; &language.predefined.iterator; &language.predefined.iteratoraggregate; &language.predefined.arrayaccess; &language.predefined.serializable; </part> <!-- 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-fr/language/predefined/iteratoraggregate.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/iteratoraggregate.xml +++ phpdoc-fr/language/predefined/iteratoraggregate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.iteratoraggregate" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface IteratorAggregate</title> <titleabbrev>IteratorAggregate</titleabbrev> <partintro> <!-- {{{ IteratorAggregate intro --> <section xml:id="iteratoraggregate.intro"> &reftitle.intro; <para> Interface pour créer un itérateur externe. </para> </section> <!-- }}} --> <section xml:id="iteratoraggregate.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>IteratorAggregate</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>IteratorAggregate</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iteratoraggregate')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="iteratoraggregate.examples"> <example xml:id="iteratoraggregate.example.basic"><!-- {{{ --> <title>Basic usage</title> <programlisting role="php"> <![CDATA[ <?php class myData implements IteratorAggregate { public $property1 = "Propriété publique numéro un"; public $property2 = "Propriété publique numéro deux"; public $property3 = "Propriété publique numéro trois"; public function __construct() { $this->property4 = "dernière propriété"; } public function getIterator() { return new ArrayIterator($this); } } $obj = new myData; foreach($obj as $key => $value) { var_dump($key, $value); echo "\n"; } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(9) "property1" string(19) "Propriété publique numéro un" string(9) "property2" string(19) "Propriété publique numéro deux" string(9) "property3" string(21) "Propriété publique numéro trois" string(9) "property4" string(13) "dernière propriété" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.iteratoraggregate.getiterator; </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-fr/language/predefined/iterator.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/iterator.xml +++ phpdoc-fr/language/predefined/iterator.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.iterator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface Iterator</title> <titleabbrev>Iterator</titleabbrev> <partintro> <!-- {{{ Iterator intro --> <section xml:id="iterator.intro"> &reftitle.intro; <para> Interface pour les itérateurs ou les objets externes qui peuvent être itérés eux-mêmes en interne. </para> </section> <!-- }}} --> <section xml:id="iterator.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Iterator</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Iterator</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="iterator.examples"> <example xml:id="iterator.example.basic"><!-- {{{ --> <title>Exemple simple</title> <para> Cet exemple montre l'ordre d'appel des méthodes lors d'un appel à l'instruction <function>foreach</function> sur un itérateur. </para> <programlisting role="php"> <![CDATA[ <?php class myIterator implements Iterator { private $position = 0; private $array = array( "premierelement", "secondelement", "dernierelement", ); public function __construct() { $this->position = 0; } function rewind() { var_dump(__METHOD__); $this->position = 0; } function current() { var_dump(__METHOD__); return $this->array[$this->position]; } function key() { var_dump(__METHOD__); return $this->position; } function next() { var_dump(__METHOD__); ++$this->position; } function valid() { var_dump(__METHOD__); return isset($this->array[$this->position]); } } $it = new myIterator; foreach($it as $key => $value) { var_dump($key, $value); echo "\n"; } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(18) "myIterator::rewind" string(17) "myIterator::valid" string(19) "myIterator::current" string(15) "myIterator::key" int(0) string(12) "premierelement" string(16) "myIterator::next" string(17) "myIterator::valid" string(19) "myIterator::current" string(15) "myIterator::key" int(1) string(13) "secondelement" string(16) "myIterator::next" string(17) "myIterator::valid" string(19) "myIterator::current" string(15) "myIterator::key" int(2) string(11) "dernierelement" string(16) "myIterator::next" string(17) "myIterator::valid" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.iterator.current; &language.predefined.iterator.key; &language.predefined.iterator.next; &language.predefined.iterator.rewind; &language.predefined.iterator.valid; </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-fr/language/predefined/serializable.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/serializable.xml +++ phpdoc-fr/language/predefined/serializable.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.serializable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface Serializable</title> <titleabbrev>Serializable</titleabbrev> <partintro> <!-- {{{ Serializable intro --> <section xml:id="serializable.intro"> &reftitle.intro; <para> Interface permettant de personnaliser la linéarisation. </para> <para> Les classes implémentant cette interface ne supportent plus <link linkend="language.oop5.magic.sleep">__sleep()</link> et <link linkend="language.oop5.magic.sleep">__wakeup()</link>. La méthode de linéarisation est appelée chaque fois qu'une instance doit être linéarisée. Elle n'appelle pas la méthode __destruct() et n'a aucun effet sur le contenu de cette méthode. Lorsque les données sont linéarisées, la classe est connue et la méthode unserialize() appropriée est appelée comme constructeur au lieu d'appeler __construct(). Si vous devez appeler le constructeur standard, vous pouvez le faire dans la méthode. </para> </section> <!-- }}} --> <section xml:id="serializable.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Serializable</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Serializable</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Méthodes</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.serializable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="serializable.examples"> <example xml:id="serializable.example.basic"><!-- {{{ --> <title>Basic usage</title> <programlisting role="php"> <![CDATA[ <?php class obj implements Serializable { private $data; public function __construct() { $this->data = "Mes données privées"; } public function serialize() { return serialize($this->data); } public function unserialize($data) { $this->data = unserialize($data); } public function getData() { return $this->data; } } $obj = new obj; $ser = serialize($obj); $newobj = unserialize($ser); var_dump($newobj->getData()); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(15) "Mes données privées" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.serializable.serialize; &language.predefined.serializable.unserialize; </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-fr/language/predefined/traversable.xml?view=markup&rev=1.1 Index: phpdoc-fr/language/predefined/traversable.xml +++ phpdoc-fr/language/predefined/traversable.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <phpdoc:classref xml:id="class.traversable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>L'interface Traversable</title> <titleabbrev>Traversable</titleabbrev> <partintro> <!-- {{{ Traversable intro --> <section xml:id="traversable.intro"> &reftitle.intro; <para> Interface permettant de détecter si une classe peut être parcourue en utilisant <function>foreach</function>. </para> <para> L'interface de base d'abstraction ne peut être implémentée seule. Elle doit être implémentée par soit <classname>IteratorAggregate</classname>, soit <classname>Iterator</classname>. </para> <note> <para> Les classes internes qui implémentent cette interface peuvent être utilisées dans une constructeur <function>foreach</function> et n'ont pas besoin d'implémenter <classname>IteratorAggregate</classname> ou <classname>Iterator</classname>. </para> </note> <note> <para> Ceci est une interface du moteur interne qui ne peut être implémentée dans des scripts PHP. Vous devez utiliser à la place <classname>IteratorAggregate</classname> ou <classname>Iterator</classname>. </para> </note> </section> <!-- }}} --> <section xml:id="traversable.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Traversable</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Traversable</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> </classsynopsis> <!-- }}} --> <para> Cette interface n'a pas de méthode ; son seul but est d'être l'interface de base pour toutes les classes permettant de parcourir des objets. </para> </section> </partintro> </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 -->