cvs: phpdoc /en/language/oop5 reflection.xml

From: Date: Tue, 23 Jun 2009 16:59:12 +0000
Subject: cvs: phpdoc /en/language/oop5 reflection.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4221@lists.php.net to get a copy of this message
kalle Tue Jun 23 16:59:12 2009 UTC Modified files: /phpdoc/en/language/oop5 reflection.xml Log: Revert dams last change here, it doesnt break the build at all :) http://cvs.php.net/viewvc.cgi/phpdoc/en/language/oop5/reflection.xml?r1=1.42&r2=1.43&diff_format=u Index: phpdoc/en/language/oop5/reflection.xml diff -u phpdoc/en/language/oop5/reflection.xml:1.42 phpdoc/en/language/oop5/reflection.xml:1.43 --- phpdoc/en/language/oop5/reflection.xml:1.42 Tue Jun 23 16:44:57 2009 +++ phpdoc/en/language/oop5/reflection.xml Tue Jun 23 16:59:11 2009 @@ -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 @@ ]]> </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">

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