Re: build list of available functions and classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




You may want to check out phpm, an attempt at creating a CLI for the PHP manual:

http://eide.org/?epc=php

Sounds interesting, I will look at it.


I'm not sure if that developer's work will answer your questions or not, but he appears to have tackled the issue already.

Also, Rasmus Lerdorf has provided a dictionary of all PHP functions for
use with VIM; this may also be useful (google for 'rasmus vim
dictionary').


Many thanks for this tip! I knew there was a reason I subscribed to this newsgroup! :)


What exactly are your requirements? If all you need is an extension (including standard PHP functions) / class / function list then you can look into the Reflections API. For example to get a class's list of functions (public, protected and private) you can use the following:

<?php

$class = 'DomDocument';
$reflection = new ReflectionClass( $class );
$methods = $reflection->getMethods();
print( nl2br( print_r( $methods, TRUE ) ) );

?>

At this point the $methods array has a bunch of ReflectionMethod objects and you can get function names from there. You can also get Parameters (I think) and comments. However, I have only gotten user-defined class and function comments to print properly.


-- Teach a person to fish...

Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux