From an architectural point of view, I think that reflection should be avoided whenever possible, but take a look at ReflectionClass-> getMethods () if you think you know what you are doing.
<?php class A { public function x() { } public function y() { } } class B extends A { public function a() { } public function b() { } public function x() { }
You will get a list of methods defined by B and A , along with the class that defined it last. This is the result:
Array ( [0] => ReflectionMethod Object ( [name] => a [class] => B ) [1] => ReflectionMethod Object ( [name] => b [class] => B ) [2] => ReflectionMethod Object ( [name] => x [class] => B ) [3] => ReflectionMethod Object ( [name] => y [class] => A ) )
Archimedix
source share