You are here: Re: Parsing a PHP file « PHP Programming Language « IT news, forums, messages
Re: Parsing a PHP file

Posted by Jeff North on 04/30/07 21:32

On 30 Apr 2007 14:09:42 -0700, in comp.lang.php Ryan Govostes
<rgovostes@gmail.com>
<1177967382.067595.130100@h2g2000hsg.googlegroups.com> wrote:

>| In my PHP script, I'd like to examine another PHP file to get
>| information on the classes it will define before I include it
>| (alternatively, getting a list of the classes after I've included it
>| would be fine too). I realize that I could do some regular expressions
>| and hope for the best, but my ideal solution has no chance of
>| misfiring (e.g. capturing something in a comment or string, or missing
>| something because it's on multiple lines).
>|
>| My idea at the moment is to pick apart something like Doxygen or GeSHi
>| and figure out some simple file parsing, but I think that's pretty
>| involved for my aims here. Does anyone have a suggestion?
>|
>| Regards,
>| Ryan Govostes

Would any of these be of help
Table of Contents

call_user_method_array - Call a user method given with an array of
parameters [deprecated]
call_user_method - Call a user method on an specific object
[deprecated]
class_exists - Checks if the class has been defined
get_class_methods - Returns an array of class methods' names
get_class_vars - Returns an array of default properties of the class
get_class - Returns the name of the class of an object
get_declared_classes - Returns an array with the name of the defined
classes
get_declared_interfaces - Returns an array of all declared interfaces
get_object_vars - Returns an associative array of object properties
get_parent_class - Retrieves the parent class name for object or class
interface_exists - Checks if the interface has been defined
is_a - Returns TRUE if the object is of this class or has this class
as one of its parents
is_subclass_of - Returns TRUE if the object has this class as one of
its parents
method_exists - Checks if the class method exists
property_exists - Checks if the object or class has a property

---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

 

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

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