cvs: phpdoc-fr /reference/funchand .cvsignore book.xml constants.xml reference.xml setup.xml /reference/funchand/functions call-user-func-array.xml
call-user-func.xml
| From: | Yannick Torres | Date: | Sun, 09 Mar 2008 09:00:28 +0000 |
| Subject: | cvs: phpdoc-fr /reference/funchand .cvsignore book.xml constants.xml reference.xml setup.xml /reference/funchand/functions call-user-func-array.xml call-user-func.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-5579@lists.php.net to get a copy of this message | ||
yannick Sun Mar 9 09:00:28 2008 UTC
Added files:
/phpdoc-fr/reference/funchand book.xml constants.xml setup.xml
Removed files:
/phpdoc-fr/reference/funchand .cvsignore
Modified files:
/phpdoc-fr/reference/funchand reference.xml
/phpdoc-fr/reference/funchand/functions call-user-func-array.xml
call-user-func.xml
Log:
sync with EN
http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/reference.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc-fr/reference/funchand/reference.xml diff -u phpdoc-fr/reference/funchand/reference.xml:1.11 phpdoc-fr/reference/funchand/reference.xml:1.12 --- phpdoc-fr/reference/funchand/reference.xml:1.11 Mon Dec 10 17:10:06 2007 +++ phpdoc-fr/reference/funchand/reference.xml Sun Mar 9 09:00:28 2008 @@ -1,48 +1,15 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> -<!-- Purpose: basic.vartype --> -<!-- Membership: core --> +<!-- $Revision: 1.12 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> -<reference xml:id="ref.funchand" xmlns="http://docbook.org/ns/docbook"> - <title>Fonctions</title> - <titleabbrev>Fonctions</titleabbrev> +<reference xml:id="funchand.strings" xmlns="http://docbook.org/ns/docbook"> + <title>&Functions; sur la gestion des fonctions</title> - <partintro> - <section xml:id="funchand.intro"> - &reftitle.intro; - <para> - Ces fonctions effectuent les manipulations liées à - la gestion des fonctions. - </para> - </section> - - <section xml:id="funchand.requirements"> - &reftitle.required; - &no.requirement; - </section> - - <section xml:id="funchand.installation"> - &reftitle.install; - &no.install; - </section> - - <section xml:id="funchand.configuration"> - &reftitle.runtime; - &no.config; - </section> - - <section xml:id="funchand.constants"> - &reftitle.constants; - &no.constants; - </section> - - </partintro> - -&reference.funchand.entities.functions; + &reference.funchand.entities.functions; </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -59,5 +26,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: ---> - +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/functions/call-user-func-array.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc-fr/reference/funchand/functions/call-user-func-array.xml diff -u phpdoc-fr/reference/funchand/functions/call-user-func-array.xml:1.14 phpdoc-fr/reference/funchand/functions/call-user-func-array.xml:1.15 --- phpdoc-fr/reference/funchand/functions/call-user-func-array.xml:1.14 Sun Jul 22 18:10:52 2007 +++ phpdoc-fr/reference/funchand/functions/call-user-func-array.xml Sun Mar 9 09:00:28 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.15 $ --> +<!-- EN-Revision: 1.19 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xml:id="function.call-user-func-array" xmlns="http://docbook.org/ns/docbook"> @@ -82,9 +82,47 @@ ]]> </programlisting> </example> + <example> + <title>Exemple avec <function>call_user_func_array</function> en utilisant un espace de nom</title> + <programlisting role="php"> +<![CDATA[ +<?php + +namespace Foobar; + +class Foo { + static public function test($name) { + print "Hello {$name}!\n"; + } +} + +// Depuis PHP 5.3.0 +call_user_func_array(__NAMESPACE__ .'::Foo::test', array('Hannes')); +// Hello Hannes! + +// Depuis PHP 5.3.0 +call_user_func_array(array(__NAMESPACE__ .'::Foo', 'test'), array('Philip')); +// Hello Philip! + +?> +]]> + </programlisting> + </example> </para> </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Les variables référencées dans le paramètre <parameter>param_arr</parameter> + sont passées à la fonction par référece, les autres sont passées par leur + valeur. En d'autres termes, cela ne dépend pas de la signature de la fonction + suivant que le paramètre est passé par valeur ou par référence. + </para> + </note> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/functions/call-user-func.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/funchand/functions/call-user-func.xml diff -u phpdoc-fr/reference/funchand/functions/call-user-func.xml:1.15 phpdoc-fr/reference/funchand/functions/call-user-func.xml:1.16 --- phpdoc-fr/reference/funchand/functions/call-user-func.xml:1.15 Sun Jul 22 18:10:52 2007 +++ phpdoc-fr/reference/funchand/functions/call-user-func.xml Sun Mar 9 09:00:28 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.19 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xml:id="function.call-user-func" xmlns="http://docbook.org/ns/docbook"> @@ -100,20 +100,46 @@ </programlisting> </example> <example> - <title>Utilisation d'une méthode d'une classe</title> + <title>Exemple avec <function>call_user_func</function> en utilisant un espace de noms</title> <programlisting role="php"> <![CDATA[ <?php + +namespace Foobar; + +class Foo { + static public function test() { + print "Hello world!\n"; + } +} + +call_user_func(__NAMESPACE__ .'::Foo::test'); // Depuis PHP 5.3.0 +// Hello world! +call_user_func(array(__NAMESPACE__ .'::Foo', 'test')); // Depuis PHP 5.3.0 +// Hello world! + +?> +]]> + </programlisting> + </example> + <example> + <title>Utilisation d'une méthode de classe</title> + <programlisting role="php"> +<![CDATA[ +<?php + class myclass { - function say_hello() + static function say_hello() { - echo "Bonjour !\n"; + echo "Hello!\n"; } } $classname = "myclass"; call_user_func(array($classname, 'say_hello')); +call_user_func($classname .'::say_hello'); // Depuis 5.2.3 + ?> ]]> </programlisting> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/funchand/book.xml +++ phpdoc-fr/reference/funchand/book.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: basic.vartype --> <!-- Membership: core --> <book xml:id="book.funchand" xmlns="http://docbook.org/ns/docbook"> <title>&Functions; sur la gestion des fonctions</title> <titleabbrev>Gestion des fonctions</titleabbrev> <preface xml:id="intro.funchand"> &reftitle.intro; <para> Ces fonctions effectuent les manipulations liées à la gestion des fonctions. </para> </preface> &reference.funchand.setup; &reference.funchand.constants; &reference.funchand.reference; </book> <!-- 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/reference/funchand/constants.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/funchand/constants.xml +++ phpdoc-fr/reference/funchand/constants.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <appendix xml:id="funchand.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.constants; &no.constants; </appendix> <!-- 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/reference/funchand/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/funchand/setup.xml +++ phpdoc-fr/reference/funchand/setup.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="funchand.setup"> &reftitle.setup; <section xml:id="funchand.requirements"> &reftitle.required; &no.requirement; </section> <section xml:id="funchand.installation"> &reftitle.install; &no.install; </section> <section xml:id="funchand.configuration"> &reftitle.runtime; &no.config; </section> <section xml:id="funchand.resources"> &reftitle.resources; &no.resource; </section> </chapter> <!-- 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/reference/funchand/reference.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc-fr/reference/funchand/reference.xml diff -u phpdoc-fr/reference/funchand/reference.xml:1.11 phpdoc-fr/reference/funchand/reference.xml:1.12 --- phpdoc-fr/reference/funchand/reference.xml:1.11 Mon Dec 10 17:10:06 2007 +++ phpdoc-fr/reference/funchand/reference.xml Sun Mar 9 09:00:28 2008 @@ -1,48 +1,15 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- EN-Revision: 1.8 Maintainer: yannick Status: ready --> -<!-- Purpose: basic.vartype --> -<!-- Membership: core --> +<!-- $Revision: 1.12 $ --> +<!-- EN-Revision: 1.10 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> -<reference xml:id="ref.funchand" xmlns="http://docbook.org/ns/docbook"> - <title>Fonctions</title> - <titleabbrev>Fonctions</titleabbrev> +<reference xml:id="funchand.strings" xmlns="http://docbook.org/ns/docbook"> + <title>&Functions; sur la gestion des fonctions</title> - <partintro> - <section xml:id="funchand.intro"> - &reftitle.intro; - <para> - Ces fonctions effectuent les manipulations liées à - la gestion des fonctions. - </para> - </section> - - <section xml:id="funchand.requirements"> - &reftitle.required; - &no.requirement; - </section> - - <section xml:id="funchand.installation"> - &reftitle.install; - &no.install; - </section> - - <section xml:id="funchand.configuration"> - &reftitle.runtime; - &no.config; - </section> - - <section xml:id="funchand.constants"> - &reftitle.constants; - &no.constants; - </section> - - </partintro> - -&reference.funchand.entities.functions; + &reference.funchand.entities.functions; </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -59,5 +26,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: ---> - +--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/functions/call-user-func-array.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc-fr/reference/funchand/functions/call-user-func-array.xml diff -u phpdoc-fr/reference/funchand/functions/call-user-func-array.xml:1.14 phpdoc-fr/reference/funchand/functions/call-user-func-array.xml:1.15 --- phpdoc-fr/reference/funchand/functions/call-user-func-array.xml:1.14 Sun Jul 22 18:10:52 2007 +++ phpdoc-fr/reference/funchand/functions/call-user-func-array.xml Sun Mar 9 09:00:28 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.15 $ --> +<!-- EN-Revision: 1.19 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xml:id="function.call-user-func-array" xmlns="http://docbook.org/ns/docbook"> @@ -82,9 +82,47 @@ ]]> </programlisting> </example> + <example> + <title>Exemple avec <function>call_user_func_array</function> en utilisant un espace de nom</title> + <programlisting role="php"> +<![CDATA[ +<?php + +namespace Foobar; + +class Foo { + static public function test($name) { + print "Hello {$name}!\n"; + } +} + +// Depuis PHP 5.3.0 +call_user_func_array(__NAMESPACE__ .'::Foo::test', array('Hannes')); +// Hello Hannes! + +// Depuis PHP 5.3.0 +call_user_func_array(array(__NAMESPACE__ .'::Foo', 'test'), array('Philip')); +// Hello Philip! + +?> +]]> + </programlisting> + </example> </para> </refsect1> + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Les variables référencées dans le paramètre <parameter>param_arr</parameter> + sont passées à la fonction par référece, les autres sont passées par leur + valeur. En d'autres termes, cela ne dépend pas de la signature de la fonction + suivant que le paramètre est passé par valeur ou par référence. + </para> + </note> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/functions/call-user-func.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc-fr/reference/funchand/functions/call-user-func.xml diff -u phpdoc-fr/reference/funchand/functions/call-user-func.xml:1.15 phpdoc-fr/reference/funchand/functions/call-user-func.xml:1.16 --- phpdoc-fr/reference/funchand/functions/call-user-func.xml:1.15 Sun Jul 22 18:10:52 2007 +++ phpdoc-fr/reference/funchand/functions/call-user-func.xml Sun Mar 9 09:00:28 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- EN-Revision: 1.17 Maintainer: yannick Status: ready --> +<!-- $Revision: 1.16 $ --> +<!-- EN-Revision: 1.19 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <refentry xml:id="function.call-user-func" xmlns="http://docbook.org/ns/docbook"> @@ -100,20 +100,46 @@ </programlisting> </example> <example> - <title>Utilisation d'une méthode d'une classe</title> + <title>Exemple avec <function>call_user_func</function> en utilisant un espace de noms</title> <programlisting role="php"> <![CDATA[ <?php + +namespace Foobar; + +class Foo { + static public function test() { + print "Hello world!\n"; + } +} + +call_user_func(__NAMESPACE__ .'::Foo::test'); // Depuis PHP 5.3.0 +// Hello world! +call_user_func(array(__NAMESPACE__ .'::Foo', 'test')); // Depuis PHP 5.3.0 +// Hello world! + +?> +]]> + </programlisting> + </example> + <example> + <title>Utilisation d'une méthode de classe</title> + <programlisting role="php"> +<![CDATA[ +<?php + class myclass { - function say_hello() + static function say_hello() { - echo "Bonjour !\n"; + echo "Hello!\n"; } } $classname = "myclass"; call_user_func(array($classname, 'say_hello')); +call_user_func($classname .'::say_hello'); // Depuis 5.2.3 + ?> ]]> </programlisting> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/funchand/book.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/funchand/book.xml +++ phpdoc-fr/reference/funchand/book.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Purpose: basic.vartype --> <!-- Membership: core --> <book xml:id="book.funchand" xmlns="http://docbook.org/ns/docbook"> <title>&Functions; sur la gestion des fonctions</title> <titleabbrev>Gestion des fonctions</titleabbrev> <preface xml:id="intro.funchand"> &reftitle.intro; <para> Ces fonctions effectuent les manipulations liées à la gestion des fonctions. </para> </preface> &reference.funchand.setup; &reference.funchand.constants; &reference.funchand.reference; </book> <!-- 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/reference/funchand/constants.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/funchand/constants.xml +++ phpdoc-fr/reference/funchand/constants.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <appendix xml:id="funchand.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.constants; &no.constants; </appendix> <!-- 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/reference/funchand/setup.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/funchand/setup.xml +++ phpdoc-fr/reference/funchand/setup.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <chapter xml:id="funchand.setup"> &reftitle.setup; <section xml:id="funchand.requirements"> &reftitle.required; &no.requirement; </section> <section xml:id="funchand.installation"> &reftitle.install; &no.install; </section> <section xml:id="funchand.configuration"> &reftitle.runtime; &no.config; </section> <section xml:id="funchand.resources"> &reftitle.resources; &no.resource; </section> </chapter> <!-- 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 -->