gerzson Tue Mar 12 06:14:38 2002 EDT Modified files: /phpdoc/en/functions classobj.xml /phpdoc/hu/functions classobj.xml Log: Torben was quicker :) and forestalled me
Index: phpdoc/en/functions/classobj.xml diff -u phpdoc/en/functions/classobj.xml:1.35 phpdoc/en/functions/classobj.xml:1.36 --- phpdoc/en/functions/classobj.xml:1.35 Mon Mar 11 20:10:46 2002 +++ phpdoc/en/functions/classobj.xml Tue Mar 12 06:14:37 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.35 $ --> +<!-- $Revision: 1.36 $ --> <reference id="ref.classobj"> <title>Class/Object Functions</title> <titleabbrev>Classes/Objects</titleabbrev> @@ -170,45 +170,11 @@ </sect1> </partintro> - <refentry id="function.call-user-method-array"> - <refnamediv> - <refname>call_user_method_array</refname> - <refpurpose> - Call a user method given with an array of parameters - </refpurpose> - </refnamediv> - <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> - <para> - Calls a the method referred by <parameter>method_name</parameter> from - the user defined <parameter>obj</parameter> object, using the parameters - in <parameter>paramarr</parameter>. - </para> - <para> - See also: - <function>call_user_func_array</function>, - <function>call_user_func</function>, - <function>call_user_method</function>. - </para> - <note> - <para> - This function was added to the CVS code after release of PHP 4.0.4pl1 - </para> - </note> - </refsect1> - </refentry> - <refentry id="function.call-user-method"> <refnamediv> <refname>call_user_method</refname> <refpurpose> - Call a user method on an specific object + Call a user method on an specific object [deprecated] </refpurpose> </refnamediv> <refsect1> @@ -220,6 +186,13 @@ <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> </methodsynopsis> + <warning> + <para> + The <function>call_user_method</function> function is deprecated + as of PHP 4.1.0, use the <function>call_user_func</function> variety + with the <literal>array(&$obj, "method_name")</literal> syntax instead. + </para> + </warning> <para> Calls a the method referred by <parameter>method_name</parameter> from the user defined <parameter>obj</parameter> object. An example of usage @@ -259,12 +232,53 @@ </para> <simpara> See also <function>call_user_func_array</function>, - <function>call_user_func</function>, + <function>call_user_func</function>, and <function>call_user_method_array</function>. </simpara> </refsect1> </refentry> + <refentry id="function.call-user-method-array"> + <refnamediv> + <refname>call_user_method_array</refname> + <refpurpose> + Call a user method given with an array of parameters [deprecated] + </refpurpose> + </refnamediv> + <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> + <warning> + <para> + The <function>call_user_method_array</function> function is deprecated + as of PHP 4.1.0, use the <function>call_user_func_array</function> variety + with the <literal>array(&$obj, "method_name")</literal> syntax instead. + </para> + </warning> + <para> + Calls a the method referred by <parameter>method_name</parameter> from + the user defined <parameter>obj</parameter> object, using the parameters + in <parameter>paramarr</parameter>. + </para> + <para> + See also: + <function>call_user_func_array</function>, + <function>call_user_func</function>, + <function>call_user_method</function>. + </para> + <note> + <para> + This function was added to the CVS code after release of PHP 4.0.4pl1 + </para> + </note> + </refsect1> + </refentry> + <refentry id="function.class-exists"> <refnamediv> <refname>class_exists</refname> @@ -309,8 +323,8 @@ </note> <simpara> See also <function>get_parent_class</function>, - <function>get_type</function>, and - <function>is_subclass_of</function> + <function>gettype</function>, and + <function>is_subclass_of</function>. </simpara> </refsect1> </refentry> @@ -324,7 +338,7 @@ <title>Description</title> <methodsynopsis> <type>array</type><methodname>get_class_methods</methodname> - <methodparam><type>string</type><parameter>class_name</parameter></methodparam> + <methodparam><type>mixed</type><parameter>class_name</parameter></methodparam> </methodsynopsis> <para> This function returns an array of method names defined for the @@ -337,7 +351,7 @@ <informalexample> <programlisting> <![CDATA[ -$class_methods = get_class_methods($my_class); +$class_methods = get_class_methods($my_class); // see below the full example ]]> </programlisting> </informalexample> @@ -367,9 +381,9 @@ } } -$my_class = new myclass(); +$my_object = new myclass(); -$class_methods = get_class_methods(get_class($my_class)); +$class_methods = get_class_methods(get_class($my_object)); foreach ($class_methods as $method_name) { echo "$method_name\n"; @@ -393,8 +407,8 @@ </informalexample> </para> <simpara> - See also <function>get_class_vars</function>, - <function>get_object_vars</function> + See also <function>get_class_vars</function> and + <function>get_object_vars</function>. </simpara> </refsect1> </refentry> @@ -553,32 +567,38 @@ } } +// "$label" is declared but not defined $p1 = new Point2D(1.233, 3.445); print_r(get_object_vars($p1)); -// "$label" is declared but not defined -// Array -// ( -// [x] => 1.233 -// [y] => 3.445 -// ) $p1->setLabel("point #1"); print_r(get_object_vars($p1)); -// Array -// ( -// [x] => 1.233 -// [y] => 3.445 -// [label] => point #1 -// ) ?> ]]> </programlisting> </example> + The printout of the above program will be: + <screen> +<![CDATA[ + Array + ( + [x] => 1.233 + [y] => 3.445 + ) + + Array + ( + [x] => 1.233 + [y] => 3.445 + [label] => point #1 + ) +]]> + </screen> </para> <simpara> - See also <function>get_class_methods</function>, - <function>get_class_vars</function> + See also <function>get_class_methods</function> and + <function>get_class_vars</function>! </simpara> </refsect1> </refentry> @@ -632,7 +652,7 @@ </para> <simpara> See also <function>get_class</function>, - <function>get_parent_class</function> and + <function>get_parent_class</function>, and <function>is_subclass_of</function>. </simpara> </refsect1> Index: phpdoc/hu/functions/classobj.xml diff -u phpdoc/hu/functions/classobj.xml:1.9 phpdoc/hu/functions/classobj.xml:1.10 --- phpdoc/hu/functions/classobj.xml:1.9 Tue Mar 12 05:59:30 2002 +++ phpdoc/hu/functions/classobj.xml Tue Mar 12 06:14:37 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-2"?> -<!-- EN-Revision: 1.34 Maintainer: goba Status: ready --> +<!-- EN-Revision: 1.36 Maintainer: goba Status: ready --> <!-- CREDITS: zvaranka,gerzson --> <reference id="ref.classobj"> @@ -516,7 +516,11 @@ </para> <para> Attól függően, hogy milyen kiterjesztések vannak betöltve, egyéb - osztályok is megjelenhetnek a listában. + osztályok is megjelenhetnek a listában. Ez azt jelenti, hogy + saját osztályokat ilyen nevekkel már nem lehet definiálni. A függelékben + vannak felsorolva az <link + linkend="reserved.classes">előre definiált osztályok</link> hasonló + címmel. </para> </note> </refsect1>