Revert dams last change here, it doesnt break the build at all :)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@282668 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kalle Sommer Nielsen 2009-06-23 16:59:11 +00:00
parent 021cc13b97
commit 3ea6788507

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.42 $ -->
<!-- $Revision: 1.43 $ -->
<sect1 xml:id="language.oop5.reflection" xmlns="http://docbook.org/ns/docbook">
<title>Reflection</title>
<sect2 xml:id="language.oop5.reflection.toc">
@ -667,41 +667,6 @@ var_dump($method->invoke(NULL));
]]>
</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">