cvs: phpdoc /en/reference/classobj/functions call-user-method-array.xml call-user-method.xml
| From: | Etienne Kneuss | Date: | Sat, 08 Dec 2007 02:14:26 +0000 |
| Subject: | cvs: phpdoc /en/reference/classobj/functions call-user-method-array.xml call-user-method.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-554@lists.php.net to get a copy of this message | ||
colder Sat Dec 8 02:14:26 2007 UTC
Modified files:
/phpdoc/en/reference/classobj/functions call-user-method-array.xml
call-user-method.xml
Log:
reference only required in PHP4, add an alternative as an example
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/classobj/functions/call-user-method-array.xml?r1=1.10&r2=1.11&diff_format=u
Index: phpdoc/en/reference/classobj/functions/call-user-method-array.xml
diff -u phpdoc/en/reference/classobj/functions/call-user-method-array.xml:1.10
phpdoc/en/reference/classobj/functions/call-user-method-array.xml:1.11
--- phpdoc/en/reference/classobj/functions/call-user-method-array.xml:1.10 Wed Jun 20 22:24:16 2007
+++ phpdoc/en/reference/classobj/functions/call-user-method-array.xml Sat Dec 8 02:14:26 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<refentry xml:id="function.call-user-method-array" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>call_user_method_array</refname>
@@ -11,16 +11,31 @@
<type>mixed</type><methodname>call_user_method_array</methodname>
<methodparam><type>string</type><parameter>method_name</parameter></methodparam>
<methodparam><type>object</type><parameter
role="reference">obj</parameter></methodparam>
-
<methodparam><type>array</type><parameter>paramarr</parameter></methodparam>
+
<methodparam><type>array</type><parameter>params</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.
+ as of PHP 4.1.0.
</para>
</warning>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>call_user_method_array</function> alternative</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+call_user_func_array(array($obj, $method_name), $params);
+call_user_func_array(array(&$obj, $method_name), $params); // PHP 4
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/classobj/functions/call-user-method.xml?r1=1.13&r2=1.14&diff_format=u
Index: phpdoc/en/reference/classobj/functions/call-user-method.xml
diff -u phpdoc/en/reference/classobj/functions/call-user-method.xml:1.13
phpdoc/en/reference/classobj/functions/call-user-method.xml:1.14
--- phpdoc/en/reference/classobj/functions/call-user-method.xml:1.13 Wed Jun 20 22:24:16 2007
+++ phpdoc/en/reference/classobj/functions/call-user-method.xml Sat Dec 8 02:14:26 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.13 $ -->
+<!-- $Revision: 1.14 $ -->
<refentry xml:id="function.call-user-method" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>call_user_method</refname>
@@ -17,11 +17,26 @@
<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.
+ as of PHP 4.1.0.
</para>
</warning>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>call_user_method</function> alternative</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+call_user_func(array($obj, $method_name), $parameter /* , ... */);
+call_user_func(array(&$obj, $method_name), $parameter /* , ... */); // PHP 4
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>