note 76884 added to language.oop5.reflection

From: Date: Fri, 03 Aug 2007 20:29:22 +0000
Subject: note 76884 added to language.oop5.reflection
Groups: php.notes 
Request: Send a blank email to php-notes+get-129156@lists.php.net to get a copy of this message
If you are looking for the long $filters for ReflectionClass::getMethods(), here they are. They took me a long time to find. Found nothing in the docs, nor google. But of course, Reflection itself was the final solution, in the form of ReflectionExtension::export("Reflection"). <?php //The missing long $filter values!!! ReflectionMethod::IS_STATIC; ReflectionMethod::IS_PUBLIC; ReflectionMethod::IS_PROTECTED; ReflectionMethod::IS_PRIVATE; ReflectionMethod::IS_ABSTRACT; ReflectionMethod::IS_FINAL; //Use them like this $R = new ReflectionClass("MyClass"); //print all public methods foreach ($R->getMethods(ReflectionMethod::IS_PUBLIC) as $m) echo $m->__toString(); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 208.127.40.54 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.reflection.php Edit -- https://master.php.net/note/edit/76884 Del: integrated -- https://master.php.net/note/delete/76884/integrated Del: useless -- https://master.php.net/note/delete/76884/useless Del: bad code -- https://master.php.net/note/delete/76884/bad+code Del: spam -- https://master.php.net/note/delete/76884/spam Del: non-english -- https://master.php.net/note/delete/76884/non-english Del: in docs -- https://master.php.net/note/delete/76884/in+docs Del: other reasons-- https://master.php.net/note/delete/76884 Reject -- https://master.php.net/note/reject/76884 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129156) next »