cvs: phpdoc /en/appendices comparisons.xml /en/language/oop5 reflection.xml /en/language/predefined/exception getprevious.xml
/en/reference/array/functions array-replace-recursive.xml array-replace.xml

From: Date: Tue, 23 Jun 2009 16:44:57 +0000
Subject: cvs: phpdoc /en/appendices comparisons.xml /en/language/oop5 reflection.xml /en/language/predefined/exception getprevious.xml
/en/reference/array/functions array-replace-recursive.xml array-replace.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4219@lists.php.net to get a copy of this message
dams Tue Jun 23 16:44:57 2009 UTC Modified files: /phpdoc/en/appendices comparisons.xml /phpdoc/en/language/oop5 reflection.xml /phpdoc/en/language/predefined/exception getprevious.xml /phpdoc/en/reference/array/functions array-replace-recursive.xml array-replace.xml Log: fix build http://cvs.php.net/viewvc.cgi/phpdoc/en/appendices/comparisons.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/appendices/comparisons.xml diff -u phpdoc/en/appendices/comparisons.xml:1.14 phpdoc/en/appendices/comparisons.xml:1.15 --- phpdoc/en/appendices/comparisons.xml:1.14 Tue Feb 19 21:45:29 2008 +++ phpdoc/en/appendices/comparisons.xml Tue Jun 23 16:44:57 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <appendix xml:id="types.comparisons" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>PHP type comparison tables</title> <para> @@ -58,7 +58,7 @@ <entry>&false;</entry> </row> <row> - <entry><literal>$x = null;</literal></entry> + <entry><literal>$x = null</literal></entry> <entry><type>NULL</type></entry> <entry>&true;</entry> <entry>&true;</entry> http://cvs.php.net/viewvc.cgi/phpdoc/en/language/oop5/reflection.xml?r1=1.41&r2=1.42&diff_format=u Index: phpdoc/en/language/oop5/reflection.xml diff -u phpdoc/en/language/oop5/reflection.xml:1.41 phpdoc/en/language/oop5/reflection.xml:1.42 --- phpdoc/en/language/oop5/reflection.xml:1.41 Tue Jun 23 15:42:45 2009 +++ phpdoc/en/language/oop5/reflection.xml Tue Jun 23 16:44:57 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.41 $ --> +<!-- $Revision: 1.42 $ --> <sect1 xml:id="language.oop5.reflection" xmlns="http://docbook.org/ns/docbook"> <title>Reflection</title> <sect2 xml:id="language.oop5.reflection.toc"> @@ -19,7 +19,7 @@ </simplelist> </sect2> <sect2 xml:id="language.oop5.reflection.introduction"> - <title>Introduction</title> + &reftitle.intro; <para> PHP 5 comes with a complete reflection API that adds the ability to <literal>reverse-engineer</literal> classes, interfaces, functions and methods as well @@ -667,6 +667,41 @@ ]]> </programlisting> </example> + <example> + <title>Getting closure using <classname>ReflectionMethod</classname> class</title> + <programlisting role='php'> +<![CDATA[ +<?php + +class Example { + static function printer () { + echo "Hello World!\n"; + } +} + +$class = new ReflectionClass('Example'); +$method = $class->getMethod('printer'); +$closure = $method->getClosure(); /* As of PHP 5.3.0 */ +$closure(); // Hello World! + +?> +]]> + </programlisting> + </example> + <note> + <simpara> + Trying to invoke private, protected or abstract methods will result + in an exception being thrown from the <function>invoke</function> + method. + </simpara> + </note> + <note> + <simpara> + For static methods as seen above, you should pass &null; as the first + argument to <function>invoke</function>. For non-static methods, pass + an instance of the class. + </simpara> + </note> </sect2> <sect2 xml:id="language.oop5.reflection.reflectionproperty"> http://cvs.php.net/viewvc.cgi/phpdoc/en/language/predefined/exception/getprevious.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/language/predefined/exception/getprevious.xml diff -u phpdoc/en/language/predefined/exception/getprevious.xml:1.2 phpdoc/en/language/predefined/exception/getprevious.xml:1.3 --- phpdoc/en/language/predefined/exception/getprevious.xml:1.2 Sun Apr 19 11:41:02 2009 +++ phpdoc/en/language/predefined/exception/getprevious.xml Tue Jun 23 16:44:57 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry xml:id="exception.getprevious" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> @@ -26,7 +26,8 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns the previous Exception if available or &null; otherwise. + Returns the previous <classname>Exception</classname> if available + or &null; otherwise. </para> </refsect1> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/array/functions/array-replace-recursive.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/array/functions/array-replace-recursive.xml diff -u phpdoc/en/reference/array/functions/array-replace-recursive.xml:1.1 phpdoc/en/reference/array/functions/array-replace-recursive.xml:1.2 --- phpdoc/en/reference/array/functions/array-replace-recursive.xml:1.1 Tue Jun 23 15:51:34 2009 +++ phpdoc/en/reference/array/functions/array-replace-recursive.xml Tue Jun 23 16:44:57 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry xml:id="function.array-replace-recursive" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>array_replace_recursive</refname> @@ -62,7 +62,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns an &array;, or &null; if an error occurs. + Returns an <type>array</type>, or &null; if an error occurs. </para> </refsect1> <refsect1 role="examples"> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/array/functions/array-replace.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/array/functions/array-replace.xml diff -u phpdoc/en/reference/array/functions/array-replace.xml:1.1 phpdoc/en/reference/array/functions/array-replace.xml:1.2 --- phpdoc/en/reference/array/functions/array-replace.xml:1.1 Tue Jun 23 15:51:34 2009 +++ phpdoc/en/reference/array/functions/array-replace.xml Tue Jun 23 16:44:57 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry xml:id="function.array-replace" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>array_replace</refname> @@ -55,7 +55,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Returns an &array;, or &null; if an error occurs. + Returns an <type>array</type>, or &null; if an error occurs. </para> </refsect1> <refsect1 role="examples">

« previous php.doc.cvs (#4219) next »