cvs: phpdoc-fr /reference/classobj reference.xml /reference/classobj/functions call-user-method-array.xml call-user-method.xml class-exists.xml
get-class-vars.xml get-class.xml get-declared-classes.xml get-object-vars.xml get-parent-class.xml is-a.xml method-exists.xml

From: Date: Tue, 26 Aug 2003 12:59:05 +0000
Subject: cvs: phpdoc-fr /reference/classobj reference.xml /reference/classobj/functions call-user-method-array.xml call-user-method.xml class-exists.xml
get-class-vars.xml get-class.xml get-declared-classes.xml get-object-vars.xml get-parent-class.xml is-a.xml method-exists.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-724@lists.php.net to get a copy of this message
dams Tue Aug 26 08:59:05 2003 EDT Added files: /phpdoc-fr/reference/classobj/functions is-a.xml Modified files: /phpdoc-fr/reference/classobj reference.xml /phpdoc-fr/reference/classobj/functions call-user-method-array.xml call-user-method.xml class-exists.xml get-class-vars.xml get-class.xml get-declared-classes.xml get-object-vars.xml get-parent-class.xml method-exists.xml Log: update protos

Index: phpdoc-fr/reference/classobj/reference.xml diff -u phpdoc-fr/reference/classobj/reference.xml:1.7 phpdoc-fr/reference/classobj/reference.xml:1.8 --- phpdoc-fr/reference/classobj/reference.xml:1.7 Sun May 25 21:25:20 2003 +++ phpdoc-fr/reference/classobj/reference.xml Tue Aug 26 08:59:04 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <reference id="ref.classobj"> <title>Classes et Objets</title> <titleabbrev>Classes et Objets</titleabbrev> @@ -82,10 +82,10 @@ class Epinard extends Legume { var $cuit = FALSE; function Epinard() { - $this-&gt;Legume( TRUE, &quot;green&quot; ); + $this->Legume( TRUE, "green" ); } function cuisine() { - $this-&gt;cuit = TRUE; + $this->cuit = TRUE; } function is_cooked() { Index: phpdoc-fr/reference/classobj/functions/call-user-method-array.xml diff -u phpdoc-fr/reference/classobj/functions/call-user-method-array.xml:1.1 phpdoc-fr/reference/classobj/functions/call-user-method-array.xml:1.2 --- phpdoc-fr/reference/classobj/functions/call-user-method-array.xml:1.1 Sun Apr 14 20:22:49 2002 +++ phpdoc-fr/reference/classobj/functions/call-user-method-array.xml Tue Aug 26 08:59:04 2003 @@ -11,23 +11,23 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>mixed</type><methodname>call_user_method_array</methodname> - <methodparam><type>string</type><parameter>method_name</parameter></methodparam> - <methodparam><type>object</type><parameter>obj</parameter></methodparam> - <methodparam choice="opt"><type>array</type><parameter>paramarr</parameter></methodparam> - </methodsynopsis> + <type>mixed</type><methodname>call_user_method_array</methodname> + <methodparam><type>string</type><parameter>method_name</parameter></methodparam> + <methodparam><type>object</type><parameter>obj</parameter></methodparam> + <methodparam choice="opt"><type>array</type><parameter>paramarr</parameter></methodparam> + </methodsynopsis> <para> <function>call_user_method_array</function> appelle la m&eacute;thode <parameter>method_name</parameter> de l'object <parameter>obj</parameter>, en utilisant les param&egrave;tres <parameter>paramarr</parameter>, rassembl&eacute;s sous forme de tableau. </para> - <para> - Voir aussi - <function>call_user_func_array</function>, - <function>call_user_func</function> et - <function>call_user_method</function>. - </para> + <para> + Voir aussi + <function>call_user_func_array</function>, + <function>call_user_func</function> et + <function>call_user_method</function>. + </para> <note> <para> <function>call_user_method_array</function> a &eacute;t&eacute; ajout&eacute;e en version Index: phpdoc-fr/reference/classobj/functions/call-user-method.xml diff -u phpdoc-fr/reference/classobj/functions/call-user-method.xml:1.2 phpdoc-fr/reference/classobj/functions/call-user-method.xml:1.3 --- phpdoc-fr/reference/classobj/functions/call-user-method.xml:1.2 Sun May 25 21:10:08 2003 +++ phpdoc-fr/reference/classobj/functions/call-user-method.xml Tue Aug 26 08:59:04 2003 @@ -11,12 +11,12 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>mixed</type><methodname>call_user_method</methodname> - <methodparam><type>string</type><parameter>method_name</parameter></methodparam> - <methodparam><type>object</type><parameter>obj</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> - </methodsynopsis> + <type>mixed</type><methodname>call_user_method</methodname> + <methodparam><type>string</type><parameter>method_name</parameter></methodparam> + <methodparam><type>object</type><parameter>obj</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> + </methodsynopsis> <para> <function>call_user_method</function> appelle la m&eacute;thode <parameter>method_name</parameter> de l'objet Index: phpdoc-fr/reference/classobj/functions/class-exists.xml diff -u phpdoc-fr/reference/classobj/functions/class-exists.xml:1.3 phpdoc-fr/reference/classobj/functions/class-exists.xml:1.4 --- phpdoc-fr/reference/classobj/functions/class-exists.xml:1.3 Sun May 25 21:10:08 2003 +++ phpdoc-fr/reference/classobj/functions/class-exists.xml Tue Aug 26 08:59:04 2003 @@ -9,9 +9,9 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>bool</type><methodname>class_exists</methodname> - <methodparam><type>string</type><parameter>class_name</parameter></methodparam> - </methodsynopsis> + <type>bool</type><methodname>class_exists</methodname> + <methodparam><type>string</type><parameter>class_name</parameter></methodparam> + </methodsynopsis> <para> <function>class_exists</function> retourne &true; si la classe <parameter>class_name</parameter> a &eacute;t&eacute; d&eacute;finie, et &false;sinon. Index: phpdoc-fr/reference/classobj/functions/get-class-vars.xml diff -u phpdoc-fr/reference/classobj/functions/get-class-vars.xml:1.2 phpdoc-fr/reference/classobj/functions/get-class-vars.xml:1.3 --- phpdoc-fr/reference/classobj/functions/get-class-vars.xml:1.2 Sun May 25 21:10:08 2003 +++ phpdoc-fr/reference/classobj/functions/get-class-vars.xml Tue Aug 26 08:59:04 2003 @@ -11,9 +11,9 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>array</type><methodname>get_class_vars</methodname> - <methodparam><type>string</type><parameter>class_name</parameter></methodparam> - </methodsynopsis> + <type>array</type><methodname>get_class_vars</methodname> + <methodparam><type>string</type><parameter>class_name</parameter></methodparam> + </methodsynopsis> <para> <function>get_class_vars</function> retourne un tableau contenant les valeurs par d&eacute;faut des attributs de la classe Index: phpdoc-fr/reference/classobj/functions/get-class.xml diff -u phpdoc-fr/reference/classobj/functions/get-class.xml:1.1 phpdoc-fr/reference/classobj/functions/get-class.xml:1.2 --- phpdoc-fr/reference/classobj/functions/get-class.xml:1.1 Sun Apr 14 20:22:50 2002 +++ phpdoc-fr/reference/classobj/functions/get-class.xml Tue Aug 26 08:59:04 2003 @@ -9,19 +9,73 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>string</type><methodname>get_class</methodname> - <methodparam><type>object</type><parameter>obj</parameter></methodparam> - </methodsynopsis> + <type>string</type><methodname>get_class</methodname> + <methodparam><type>object</type><parameter>obj</parameter></methodparam> + </methodsynopsis> <para> <function>get_class</function> retourne la classe de l'objet - <parameter>obj</parameter>. + <parameter>obj</parameter>. <function>get_class</function> retourne + &false; si <parameter>obj</parameter> n'est pas un objet. </para> - <simpara> + <note> + <simpara> + <function>get_class</function> retourne un nom de classe utilisateur, + en minuscules. Une classe d&eacute;finie par une extension PHP est retourn&eacute;e + dans sa notation originale. + </simpara> + </note> + <para> + <example> + <title>Exemple avec <function>get_class</function></title> + <programlisting> +<![CDATA[ +<?php + +class foo { + function foo() { + // un peu de code + } + + function name() { + echo "Mon nom est " , get_class($this) , "\n"; + } +} + +// create an object +$bar = new foo(); + +// external call +echo "Son nom est " , get_class($bar) , "\n"; + +// internal call +$bar->name(); + +?> +]]> + </programlisting> + <para> + Le r&eacute;sultat sera : + </para> + <screen> +<![CDATA[ +Son nom est foo +Mon nom est foo +]]> + </screen> + </example> + </para> <simpara> Voir aussi + <function>gettype</function>, <function>get_parent_class</function> et <function>is_subclass_of</function> </simpara> - </refsect1> + <para> + Voir aussi + <function>get_parent_class</function>, + <function>gettype</function> et + <function>is_subclass_of</function>. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Index: phpdoc-fr/reference/classobj/functions/get-declared-classes.xml diff -u phpdoc-fr/reference/classobj/functions/get-declared-classes.xml:1.1 phpdoc-fr/reference/classobj/functions/get-declared-classes.xml:1.2 --- phpdoc-fr/reference/classobj/functions/get-declared-classes.xml:1.1 Sun Apr 14 20:22:51 2002 +++ phpdoc-fr/reference/classobj/functions/get-declared-classes.xml Tue Aug 26 08:59:04 2003 @@ -9,9 +9,9 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>array</type><methodname>get_declared_classes</methodname> - <void/> - </methodsynopsis> + <type>array</type><methodname>get_declared_classes</methodname> + <void/> + </methodsynopsis> <para> <function>get_declared_classes</function> retourne un tableau contenant la liste des fonctions d&eacute;clar&eacute;es dans le script courant. Index: phpdoc-fr/reference/classobj/functions/get-object-vars.xml diff -u phpdoc-fr/reference/classobj/functions/get-object-vars.xml:1.2 phpdoc-fr/reference/classobj/functions/get-object-vars.xml:1.3 --- phpdoc-fr/reference/classobj/functions/get-object-vars.xml:1.2 Sun May 25 21:10:08 2003 +++ phpdoc-fr/reference/classobj/functions/get-object-vars.xml Tue Aug 26 08:59:04 2003 @@ -11,9 +11,9 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>array</type><methodname>get_object_vars</methodname> - <methodparam><type>object</type><parameter>obj</parameter></methodparam> - </methodsynopsis> + <type>array</type><methodname>get_object_vars</methodname> + <methodparam><type>object</type><parameter>obj</parameter></methodparam> + </methodsynopsis> <para> <function>get_object_vars</function> retourne un tableau associatif contenant les propri&eacute;t&eacute;s de l'objet <parameter>obj</parameter>. Index: phpdoc-fr/reference/classobj/functions/get-parent-class.xml diff -u phpdoc-fr/reference/classobj/functions/get-parent-class.xml:1.2 phpdoc-fr/reference/classobj/functions/get-parent-class.xml:1.3 --- phpdoc-fr/reference/classobj/functions/get-parent-class.xml:1.2 Sun May 25 21:10:08 2003 +++ phpdoc-fr/reference/classobj/functions/get-parent-class.xml Tue Aug 26 08:59:04 2003 @@ -21,12 +21,59 @@ <function>get_parent_class</function> retourne le nom de la classe parente. Cette fonctionnalit&eacute; a &eacute;t&eacute; ajout&eacute;e en &php; 4.0.5. </para> - <simpara> + <para> + <example> + <title>Exemple avec <function>get_parent_class</function></title> + <programlisting> +<![CDATA[ +<?php + +class papa { + function papa() { + // un peu de code + } +} + +class child extends papa { + function child() { + echo "je suis le fils de " , get_parent_class($this) , "\n"; + } +} + +class child2 extends papa { + function child2() { + echo "Je suis aussi le papa de " , get_parent_class('child2') , "\n"; + } +} + +$foo = new child(); +$bar = new child2(); + +?> +]]> + </programlisting> + <para> + The output is: + </para> + <screen> +<![CDATA[ +je suis le fils de papa +Je suis aussi le papa de papa +]]> + </screen> + </example> + </para> + <simpara> Voir aussi <function>get_class</function> et - <function>is_subclass_of</function> + <function>is_subclass_of</function>. </simpara> - </refsect1> + <para> + Voir aussi + <function>get_class</function> et + <function>is_subclass_of</function>. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Index: phpdoc-fr/reference/classobj/functions/method-exists.xml diff -u phpdoc-fr/reference/classobj/functions/method-exists.xml:1.3 phpdoc-fr/reference/classobj/functions/method-exists.xml:1.4 --- phpdoc-fr/reference/classobj/functions/method-exists.xml:1.3 Sun May 25 21:10:08 2003 +++ phpdoc-fr/reference/classobj/functions/method-exists.xml Tue Aug 26 08:59:04 2003 @@ -11,10 +11,10 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>bool</type><methodname>method_exists</methodname> - <methodparam><type>object</type><parameter>object</parameter></methodparam> - <methodparam><type>string</type><parameter>method_name</parameter></methodparam> - </methodsynopsis> + <type>bool</type><methodname>method_exists</methodname> + <methodparam><type>object</type><parameter>object</parameter></methodparam> + <methodparam><type>string</type><parameter>method_name</parameter></methodparam> + </methodsynopsis> <para> <function>method_exists</function> retourne &true; si la m&eacute;thode <parameter>method_name</parameter> a Index: phpdoc-fr/reference/classobj/functions/is-a.xml +++ phpdoc-fr/reference/classobj/functions/is-a.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/classobj.xml, last change in rev 1.33 --> <refentry id="function.is-a"> <refnamediv> <refname>is_a</refname> <refpurpose> Retourne &true; si un objet a pour parent une classe donn&eacute;e </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>is_a</methodname> <methodparam><type>object</type><parameter>object</parameter></methodparam> <methodparam><type>string</type><parameter>class_name</parameter></methodparam> </methodsynopsis> <para> <function>is_a</function> retourne &true; si l'objet <parameter>object</parameter> a pour classe <parameter>class_name</parameter>, ou bien si <parameter>class_name</parameter> est un de ses parents. <function>is_a</function> retourne &false; sinon. </para> <simpara> Voir aussi <function>get_class</function>, <function>get_parent_class</function> et <function>is_subclass_of</function>. </simpara> </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.fr (#724) next »