Removal of closure stuff for now until its decided whether to put it in HEAD yet, fixes #48663

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@282661 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kalle Sommer Nielsen 2009-06-23 15:42:45 +00:00
parent fdd664969d
commit 9f22cf7cdc

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.40 $ -->
<!-- $Revision: 1.41 $ -->
<sect1 xml:id="language.oop5.reflection" xmlns="http://docbook.org/ns/docbook">
<title>Reflection</title>
<sect2 xml:id="language.oop5.reflection.toc">
@ -176,7 +176,6 @@ class ReflectionFunction extends ReflectionFunctionAbstract implements Reflector
public string getName()
public bool isInternal()
public bool isDisabled()
public mixed getClosure() /* As of PHP 5.3.0 */
public bool isUserDefined()
public string getFileName()
public int getStartLine()
@ -579,7 +578,6 @@ class ReflectionMethod extends ReflectionFunctionAbstract implements Reflector
public bool isConstructor()
public bool isDestructor()
public int getModifiers()
public mixed getClosure() /* As of PHP 5.3.0 */
public ReflectionClass getDeclaringClass()
// Inherited from ReflectionFunctionAbstract
@ -669,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">