You are here: Reflection API doesn't provide list of Nested Functions « PHP Programming Language « IT news, forums, messages
Reflection API doesn't provide list of Nested Functions

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация