Posted by rehevkor5 on 11/21/06 04:38
I am trying to use the reflection API in PHP 5 to execute the functions
in a class which looks like:
class Meow
{
function context()
{
function a()
{
}
function b()
{
}
}
}
I can run the following code to get the methods inside the Meow class,
but have no way of getting the functions inside those methods. In this
case, I specifically cannot get to a() and b() even though I know about
context().
$class = new ReflectionClass('Meow');
$methods = $class->getMethods();
foreach($methods as $method)
{
//get functions inside $method (how??)
}
Is there a way to do this? If not, I'm thinking of submitting a bug
report to PHP.net
Navigation:
[Reply to this message]
|