I'm making the leap to OOP with my PHP. Is there a way to list all active classes and their methods and properties?
+2
A:
Complete list of similar functions :)
Quick Look:
get_declared_classes() // gives you all declared classes
get_class_methods() // gives you all methods of class
get_class_vars() // gives you properties of the class
get_object_vars() // gives you propertis of an object
get_parent_class() // gives you parent class of the current class
Sarfraz
2010-03-03 10:34:09
+2
A:
Also, you might be interested in the Reflection API offered by PHP.
As they claim in their introduction:
PHP 5 comes with a complete reflection API that adds the ability to reverse-engineer classes, interfaces, functions, methods and extensions. Additionally, the reflection API offers ways to retrieve doc comments for functions, classes and methods.
Roberto Aloi
2010-03-03 10:41:01
reflection API is rather advanced for new users and has almost no documentation :(
Sarfraz
2010-03-03 11:14:46
Well, this sounds like the perfect reason to start writing the doc for it.
Roberto Aloi
2010-03-03 12:08:27