Page 1 of 1

How do you know what methods contain within an OBJECT ?

Posted: Sat Oct 28, 2006 4:09 am
by christian_phpbeginner
Hi, I am using Macromedia Dreamwever and Zend Engine, and see that intellisense thing. Seeing that it can reads/knows what methods we have created within a class. Is there a way for me to know it too ? How do I know methods within one class ?

For example, when I created a class Validator, then I typed:
$validator = new Validator();
$validator->......... -----> And right after the "->" sign, it will show us the pop-up selection menu containing methods of the Validator class.

Thanks,
Chris

Posted: Sat Oct 28, 2006 4:28 am
by timvw
http://be2.php.net/manual/en/language.o ... ection.php

Code: Select all

printf("---> Methods: %s\n", var_export($class->getMethods(), 1));
But i presume that an editor simply parses all the source files.. And builds it's own list instead of using the reflection api...

Posted: Sat Oct 28, 2006 4:33 am
by christian_phpbeginner
timvw wrote:http://be2.php.net/manual/en/language.o ... ection.php

Code: Select all

printf("---> Methods: %s\n", var_export($class->getMethods(), 1));
But i presume that an editor simply parses all the source files.. And builds it's own list instead of using the reflection api...

Thanks timvw. I will try this class soon. I needed this class (Reflection) to create a documentation of all the classes (old collections of classes that were created by previous programmers)...

Chris