How do you know what methods contain within an OBJECT ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
christian_phpbeginner
Forum Contributor
Posts: 136
Joined: Sat Jun 03, 2006 2:43 pm
Location: Java

How do you know what methods contain within an OBJECT ?

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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...
User avatar
christian_phpbeginner
Forum Contributor
Posts: 136
Joined: Sat Jun 03, 2006 2:43 pm
Location: Java

Post 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
Post Reply