Re: Class info thru PHPDoc

From: Date: Mon, 20 Dec 2004 03:13:00 +0000
Subject: Re: Class info thru PHPDoc
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35170@lists.php.net to get a copy of this message
bertrand Gugger wrote:
Hi Greg, How get simple XML info about classes, methods & properties defined from a script ? PHPDocumentor generates doc about classes, their properties and methods. That all is produced as DocBook XML. Does exist an intermediate condensed XML representation of it ? (simplified) (some script defines class which defines properties and methods) Is it easier to extract it from PHPDoc's production, or tokenize script and interpret tokens ? Certainly, I miss some docs. I would prefer to crawl in http://phpdoc.org/manual, but I have tiny connection. Is it possible to download a .tgz of this autodoc manual ? Sure better to auto-generate again from that heavy pear installed PhpDocumentor. I could not catch the command to autogenerate the doc from the package. Produce some simpler XML describing scripts/class/methods-properties ? required scripts ? My english is quite not to be understood, excuse me.
I understand. This does not currently happen. It would be relatively trivial to take the existing html converter and modify it to output simple xml. Conversion is done in Convert*() methods, as in ConvertMethod(), ConvertFile(), ConvertClass(), etc. All you need to do is take the existing HTMLframesConverter class and drop all the smarty code. Then, instead of using a template, simply open an output file in ConvertFile (this might be ConvertProceduralPage()), and then output the xml that you would like in there. The plan for 2.0 was to support this, but it is tricky. Why? How do you implement links? The only practical way is to adhere to some standard, say, XPointer, but this is impossible with the current setup, so it makes the in-file API documentation a bit useless. It is only useful in terms of listing what is in each file. phpDocumentor 2.0 would be organized more as a tree, to make Xpointer really easy, but it is vaporware at the moment. Greg

« previous php.pear.dev (#35170) next »