cvs: phpdoc-fr /appendices reserved.constants.core.xml reserved.xml /features commandline.xml /language oop5.xml types.xml /language/oop5
autoload.xml iterations.xml /reference/array/functions reset.xml /reference/dom reference.xml /reference/dom/functions
dom-domelement-getelementsbytagname.xml dom-domelement-getelementsbytagnamens.xml /reference/http/functions setcookie.xml /reference/ibase/functions
ibase-blob-import.xml ibase-execute.xml

From: Date: Sat, 30 Oct 2004 21:23:37 +0000
Subject: cvs: phpdoc-fr /appendices reserved.constants.core.xml reserved.xml /features commandline.xml /language oop5.xml types.xml /language/oop5
autoload.xml iterations.xml /reference/array/functions reset.xml /reference/dom reference.xml /reference/dom/functions
dom-domelement-getelementsbytagname.xml dom-domelement-getelementsbytagnamens.xml /reference/http/functions setcookie.xml /reference/ibase/functions
ibase-blob-import.xml ibase-execute.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-3559@lists.php.net to get a copy of this message
yannick Sat Oct 30 17:23:37 2004 EDT Modified files: /phpdoc-fr/appendices reserved.constants.core.xml reserved.xml /phpdoc-fr/features commandline.xml /phpdoc-fr/language/oop5 autoload.xml iterations.xml /phpdoc-fr/language oop5.xml types.xml /phpdoc-fr/reference/array/functions reset.xml /phpdoc-fr/reference/dom/functions dom-domelement-getelementsbytagnamens.xml dom-domelement-getelementsbytagname.xml /phpdoc-fr/reference/dom reference.xml /phpdoc-fr/reference/http/functions setcookie.xml /phpdoc-fr/reference/ibase/functions ibase-blob-import.xml ibase-execute.xml Log: sync with EN

http://cvs.php.net/diff.php/phpdoc-fr/appendices/reserved.constants.core.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-fr/appendices/reserved.constants.core.xml diff -u phpdoc-fr/appendices/reserved.constants.core.xml:1.8 phpdoc-fr/appendices/reserved.constants.core.xml:1.9 --- phpdoc-fr/appendices/reserved.constants.core.xml:1.8 Sat Oct 23 12:59:38 2004 +++ phpdoc-fr/appendices/reserved.constants.core.xml Sat Oct 30 17:23:24 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- EN-Revision: 1.12 Maintainer: dams Status: ready --> +<!-- $Revision: 1.9 $ --> +<!-- EN-Revision: 1.13 Maintainer: dams Status: ready --> <refentry id="reserved.constants.core"> <refnamediv> <refname>constantes prédéfinies de zend</refname> @@ -337,6 +337,10 @@ </varlistentry> </variablelist> + <para> + Voir aussi : + <link linkend="language.constants.predefined">Les constantes magiques</link>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-fr/appendices/reserved.xml?r1=1.36&r2=1.37&ty=u Index: phpdoc-fr/appendices/reserved.xml diff -u phpdoc-fr/appendices/reserved.xml:1.36 phpdoc-fr/appendices/reserved.xml:1.37 --- phpdoc-fr/appendices/reserved.xml:1.36 Sat Oct 23 12:59:38 2004 +++ phpdoc-fr/appendices/reserved.xml Sat Oct 30 17:23:25 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.36 $ --> -<!-- EN-Revision: 1.49 Maintainer: dams Status: ready --> +<!-- $Revision: 1.37 $ --> +<!-- EN-Revision: 1.51 Maintainer: dams Status: ready --> <appendix id="reserved"> <title>Mots réservés en &php;</title> <para> @@ -433,6 +433,15 @@ </varlistentry> <varlistentry> + <term>'<varname>REQUEST_TIME</varname>'</term> + <listitem> + <simpara> + Le temps Unix du début de la requête. Disponible depuis &php; 5.1.0. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> <term>'<varname>QUERY_STRING</varname>'</term> <listitem> <simpara> http://cvs.php.net/diff.php/phpdoc-fr/features/commandline.xml?r1=1.24&r2=1.25&ty=u Index: phpdoc-fr/features/commandline.xml diff -u phpdoc-fr/features/commandline.xml:1.24 phpdoc-fr/features/commandline.xml:1.25 --- phpdoc-fr/features/commandline.xml:1.24 Tue Sep 28 09:58:51 2004 +++ phpdoc-fr/features/commandline.xml Sat Oct 30 17:23:30 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.24 $ --> -<!-- EN-Revision: 1.37 Maintainer: gui Status: ready --> +<!-- $Revision: 1.25 $ --> +<!-- EN-Revision: 1.38 Maintainer: gui Status: ready --> <chapter id="features.commandline"> <title>Utiliser &php; en ligne de commande</title> <para> http://cvs.php.net/diff.php/phpdoc-fr/language/oop5/autoload.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-fr/language/oop5/autoload.xml diff -u phpdoc-fr/language/oop5/autoload.xml:1.2 phpdoc-fr/language/oop5/autoload.xml:1.3 --- phpdoc-fr/language/oop5/autoload.xml:1.2 Sun Oct 24 05:36:56 2004 +++ phpdoc-fr/language/oop5/autoload.xml Sat Oct 30 17:23:31 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.3 Maintainer: dams Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.4 Maintainer: dams Status: ready --> <sect1 id="language.oop5.autoload"> <title>Auto-chargement de classes</title> <para> @@ -28,13 +28,12 @@ <![CDATA[ <?php function __autoload($class_name) { - include_once($class_name . '.php'); + require_once $class_name . '.php'; } $obj = new MaClasse1(); $obj2 = new MaClasse2(); ?> - ]]> </programlisting> </example> http://cvs.php.net/diff.php/phpdoc-fr/language/oop5/iterations.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-fr/language/oop5/iterations.xml diff -u phpdoc-fr/language/oop5/iterations.xml:1.4 phpdoc-fr/language/oop5/iterations.xml:1.5 --- phpdoc-fr/language/oop5/iterations.xml:1.4 Sun Oct 24 05:36:56 2004 +++ phpdoc-fr/language/oop5/iterations.xml Sat Oct 30 17:23:31 2004 @@ -1,13 +1,16 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <sect1 id="language.oop5.iterations"> <title>Les Itération</title> <para> + &php; 5 fournit une façon pour les objets d'être définis, donc il est possible d'itérer à travers une liste d'éléments, avec, par exemple, une structure <link linkend="control-structures.foreach">foreach</link>. - Par défaut, toutes les propriétés publiques seront utilisées pour cette itération. + Par défaut, toutes les propriétés <link linkend="language.oop5.visibility">visibles</link> + seront utilisées pour cette itération. + </para> <example> @@ -21,8 +24,15 @@ public $var2 = 'valeur 2'; public $var3 = 'valeur 3'; - protected $protected = 'protégé'; - private $private = 'privé'; + protected $protected = 'variable protégée'; + private $private = 'variable privée'; + + function iterateVisible() { + echo "MyClass::iterateVisible:\n"; + foreach($this as $key => $value) { + print "$key => $value\n"; + } + } } $class = new MyClass(); @@ -30,6 +40,11 @@ foreach($class as $key => $value) { print "$key => $value\n"; } +echo "\n" + + +$class->iterateVisible(); + ]]> </programlisting> &example.outputs; @@ -38,15 +53,25 @@ var1 => valeur 1 var2 => valeur 2 var3 => valeur 3 + +MyClass::iterateVisible: +var1 => valeur 1 +var2 => valeur 2 +var3 => valeur 3 +protected => variable protégée +private => variable privée ]]> </screen> </example> <para> - Comme nous le montre l'affichage, l'itération <link linkend="control-structures.foreach">foreach</link> - affiche chaque variable publique définie. Pour aller plus loin, - vous pouvez implémenter un des itérateurs <link linkend="language.oop5.interfaces">interface</link> + Comme nous le montre l'affichage, l'itération <link + linkend="control-structures.foreach">foreach</link> + affiche toutes les variables <link linkend="language.oop5.visibility">visibles</link> + disponibles. Pour aller plus loin, + vous pouvez implémenter un des itérateurs <link + linkend="language.oop5.interfaces">interface</link> nommés <varname>Iterator</varname> à &php; 5. Celà permet à l'objet de décider quoi et quand l'objet doit être itéré. </para> http://cvs.php.net/diff.php/phpdoc-fr/language/oop5.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-fr/language/oop5.xml diff -u phpdoc-fr/language/oop5.xml:1.5 phpdoc-fr/language/oop5.xml:1.6 --- phpdoc-fr/language/oop5.xml:1.5 Sun Oct 24 04:58:48 2004 +++ phpdoc-fr/language/oop5.xml Sat Oct 30 17:23:32 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <chapter id="language.oop5"> <title>Les classes et les objets (&php; 5)</title> @@ -24,6 +24,7 @@ &language.oop5.interfaces; &language.oop5.overloading; &language.oop5.iterations; + &language.oop5.patterns; &language.oop5.magic; &language.oop5.final; &language.oop5.exceptions; http://cvs.php.net/diff.php/phpdoc-fr/language/types.xml?r1=1.60&r2=1.61&ty=u Index: phpdoc-fr/language/types.xml diff -u phpdoc-fr/language/types.xml:1.60 phpdoc-fr/language/types.xml:1.61 --- phpdoc-fr/language/types.xml:1.60 Sun Oct 24 04:58:48 2004 +++ phpdoc-fr/language/types.xml Sat Oct 30 17:23:32 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.60 $ --> -<!-- EN-Revision: 1.143 Maintainer: dams Status: ready --> +<!-- $Revision: 1.61 $ --> +<!-- EN-Revision: 1.144 Maintainer: dams Status: ready --> <chapter id="language.types"> <title>Les types</title> @@ -590,7 +590,7 @@ <para> Formellement : </para> - <programlisting role="php"> + <programlisting> <![CDATA[ LNUM [0-9]+ DNUM ([0-9]*[\.]{LNUM}) | ({LNUM}[\.][0-9]*) http://cvs.php.net/diff.php/phpdoc-fr/reference/array/functions/reset.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc-fr/reference/array/functions/reset.xml diff -u phpdoc-fr/reference/array/functions/reset.xml:1.11 phpdoc-fr/reference/array/functions/reset.xml:1.12 --- phpdoc-fr/reference/array/functions/reset.xml:1.11 Thu Aug 5 18:46:31 2004 +++ phpdoc-fr/reference/array/functions/reset.xml Sat Oct 30 17:23:33 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- EN-Revision: 1.11 Maintainer: didou Status: ready --> +<!-- $Revision: 1.12 $ --> +<!-- EN-Revision: 1.12 Maintainer: didou Status: ready --> <refentry id="function.reset"> <refnamediv> <refname>reset</refname> @@ -16,7 +16,8 @@ </methodsynopsis> <para> <function>reset</function> replace le pointeur de tableau - <parameter>array</parameter> au premier élément. + <parameter>array</parameter> au premier élément et retourne la valeur + du premier élément ou &false; si le tableau est vide. </para> <para> <example> http://cvs.php.net/diff.php/phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml diff -u phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml:1.2 phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml:1.3 --- phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml:1.2 Wed Jul 21 08:26:35 2004 +++ phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagnamens.xml Sat Oct 30 17:23:33 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.1 Maintainer: didou Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.2 Maintainer: didou Status: ready --> <refentry id='function.dom-domelement-getelementsbytagnamens'> <refnamediv> <refname>DOMElement->getElementsByTagNameNS</refname> @@ -15,11 +15,12 @@ </methodsynopsis> <para> Cette fonction retourne une nouvelle instance de la classe - <classname>DOMNodeList</classname> contenant les éléments dans - l'espace de noms <parameter>namespaceURI</parameter> ayant comme non - <parameter>localName</parameter>. + <classname>DOMNodeList</classname>, qui liste tous les éléments descendants + de l'espace de noms <parameter>namespaceURI</parameter> ayant comme nom + <parameter>localName</parameter>, dans l'ordre dans lequels ils sont rencontrés + dans l'arbre de cet élément. Utilisez "*" dans <parameter>localName</parameter> pour retourner tous - les éléments du même document. + les éléments de l'arbre de cet élément. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagname.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagname.xml diff -u phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagname.xml:1.1 phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagname.xml:1.2 --- phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagname.xml:1.1 Fri May 21 20:24:04 2004 +++ phpdoc-fr/reference/dom/functions/dom-domelement-getelementsbytagname.xml Sat Oct 30 17:23:34 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.1 Maintainer: didou Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.2 Maintainer: didou Status: ready --> <refentry id='function.dom-domelement-getelementsbytagname'> <refnamediv> <refname>DOMElement->getElementsByTagName</refname> @@ -14,9 +14,11 @@ </methodsynopsis> <para> Cette fonction retourne une nouvelle instance de la classe - <classname>DOMNodeList</classname> contenant les éléments dont les noms - de balises correspondant au paramètre <parameter>name</parameter>. - Utilisez "*" comme nom pour retourner tous les éléments du document. + <classname>DOMNodeList</classname>, qui liste tous les éléments descendants + ayant comme nom <parameter>name</parameter>, + dans l'ordre dans lequels ils sont rencontrés dans l'arbre de cet élément. + Utilisez "*" dans <parameter>name</parameter> pour retourner tous + les éléments de l'arbre de cet élément. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-fr/reference/dom/reference.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-fr/reference/dom/reference.xml diff -u phpdoc-fr/reference/dom/reference.xml:1.2 phpdoc-fr/reference/dom/reference.xml:1.3 --- phpdoc-fr/reference/dom/reference.xml:1.2 Sun Aug 1 13:45:10 2004 +++ phpdoc-fr/reference/dom/reference.xml Sat Oct 30 17:23:35 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.2 Maintainer: didou Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.3 Maintainer: didou Status: ready --> <reference id="ref.dom"> <title>Fonctions DOM</title> <titleabbrev>DOM</titleabbrev> @@ -53,7 +53,7 @@ </row> <row> <entry>DOMCDataSection</entry> - <entry>DOMText : DOMNode</entry> + <entry>DOMText</entry> </row> <row> <entry>DOMCharacterData</entry> @@ -61,7 +61,7 @@ </row> <row> <entry>DOMComment</entry> - <entry>DOMCharacterData : DomNode</entry> + <entry>DOMCharacterData</entry> </row> <row> <entry>DOMDocument</entry> @@ -101,7 +101,7 @@ </row> <row> <entry>DOMText</entry> - <entry>DOMCDataSection : DomNode</entry> + <entry>DOMCharacterData</entry> </row> <row> <entry>DOMException</entry> http://cvs.php.net/diff.php/phpdoc-fr/reference/http/functions/setcookie.xml?r1=1.19&r2=1.20&ty=u Index: phpdoc-fr/reference/http/functions/setcookie.xml diff -u phpdoc-fr/reference/http/functions/setcookie.xml:1.19 phpdoc-fr/reference/http/functions/setcookie.xml:1.20 --- phpdoc-fr/reference/http/functions/setcookie.xml:1.19 Thu Oct 28 10:05:30 2004 +++ phpdoc-fr/reference/http/functions/setcookie.xml Sat Oct 30 17:23:35 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.19 $ --> -<!-- EN-Revision: 1.32 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.20 $ --> +<!-- EN-Revision: 1.33 Maintainer: yannick Status: ready --> <refentry id="function.setcookie"> <refnamediv> <refname>setcookie</refname> @@ -157,7 +157,7 @@ <para> Si la directive &php; <link linkend="ini.register-globals">register_globals</link> est positionnée à <literal>on</literal>, la valeur du cookie est aussi disponible - dans une variable. Dans l'exemple ci-dessous, <varname>$TextCookie</varname> + dans une variable. Dans l'exemple ci-dessous, <varname>$TestCookie</varname> existe. Il est vivement recommandé d'utiliser <varname>$_COOKIE</varname>. </para> </note> http://cvs.php.net/diff.php/phpdoc-fr/reference/ibase/functions/ibase-blob-import.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-fr/reference/ibase/functions/ibase-blob-import.xml diff -u phpdoc-fr/reference/ibase/functions/ibase-blob-import.xml:1.8 phpdoc-fr/reference/ibase/functions/ibase-blob-import.xml:1.9 --- phpdoc-fr/reference/ibase/functions/ibase-blob-import.xml:1.8 Thu Oct 28 10:05:31 2004 +++ phpdoc-fr/reference/ibase/functions/ibase-blob-import.xml Sat Oct 30 17:23:36 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.9 $ --> +<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry id='function.ibase-blob-import'> <refnamediv> @@ -34,21 +34,26 @@ <programlisting role="php"> <![CDATA[ <?php -$dbh = ibase_connect($hote, $login, $motdepasse); +$dbh = ibase_connect($host, $username, $password); $filename = '/tmp/bar'; -$fd = fopen($fichier, 'r'); -$blob = ibase_blob_import($dbh, $fd); -fclose($fd); +$fd = fopen($filename, 'r'); +if ($fd) { -if (!is_string($blob)) { - // échec de l'importation -} else { - $query = "INSERT INTO foo (nom, donnees) VALUES ('$fichier', ?)"; - $prepared = ibase_prepare($dbh, $query); - if (!ibase_execute($prepared, $blob)) { - // échec de l'insertion de l'enregistrement + $blob = ibase_blob_import($dbh, $fd); + fclose($fd); + + if (!is_string($blob)) { + // échec de l'importation + } else { + $query = "INSERT INTO foo (name, data) VALUES ('$filename', ?)"; + $prepared = ibase_prepare($dbh, $query); + if (!ibase_execute($prepared, $blob)) { + // échec de l'insertion de l'enregistrement + } } +} else { + // impossible d'ouvrir le fichier de données } ?> ]]> http://cvs.php.net/diff.php/phpdoc-fr/reference/ibase/functions/ibase-execute.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc-fr/reference/ibase/functions/ibase-execute.xml diff -u phpdoc-fr/reference/ibase/functions/ibase-execute.xml:1.11 phpdoc-fr/reference/ibase/functions/ibase-execute.xml:1.12 --- phpdoc-fr/reference/ibase/functions/ibase-execute.xml:1.11 Thu Oct 28 10:05:31 2004 +++ phpdoc-fr/reference/ibase/functions/ibase-execute.xml Sat Oct 30 17:23:37 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.12 $ --> +<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry id="function.ibase-execute"> <refnamediv> @@ -27,33 +27,34 @@ <programlisting role="php"> <![CDATA[ <?php + +$dbh = ibase_connect($host, $username, $password); + +$updates = array( + 1 => 'Eric', + 5 => 'Filip', + 7 => 'Larry' +); + +$query = ibase_prepare($dbh, "UPDATE FOO SET BAR = ? WHERE BAZ = ?"); + +while (list($baz, $bar) = each($updates)) { + ibase_execute($query, $bar, $baz); +} - $dbh = ibase_connect($host, $username, $password); - - $updates = array( - 1 => 'Eric', - 5 => 'Filip', - 7 => 'Larry' - ); - - $query = ibase_prepare($dbh, "UPDATE FOO SET BAR = ? WHERE BAZ = ?"); - - while (list($baz, $bar) = each($updates)) { - ibase_execute($query, $bar, $baz); - } ?> ]]> </programlisting> </example> </para> <note> - <para> + <para> Depuis la version 5.0.0 de &php;, <function>ibase_execute</function> retourne le nombre d'enregistrements affectés par la requête (si supérieur à 0). Pour une requête qui réussie mais qui ne renvoie aucun enregistrement (e.g un UPDATE sur un enregistrement inexistant), <function>ibase_execute</function> retournera &true;. - </para> + </para> </note> <para> Voir aussi
« previous php.doc.fr (#3559) next »