List all methods of a given class, excluding parent class's methods in PHP

Mizutok

New Member
I'm building a unit testing framework for PHP and I was curious if there is a way to get a list of an objects methods which excludes the parent class's methods. So given this:\[code\]class Foo{ public function doSomethingFooey() { echo 'HELLO THERE!'; }}class Bar extends Foo{ public function goToTheBar() { // DRINK! }}\[/code\]I want a function which will, given the parameter \[code\]new Bar()\[/code\] return:\[code\]array( 'goToTheBar' );\[/code\]WITHOUT needing to instantiate an instance of Foo. (This means \[code\]get_class_methods\[/code\] will not work).
 
Back
Top