Re: How to document folders and other file types with phpDocumentor
| From: | Chuck Burgess | Date: | Mon, 23 Apr 2007 13:53:20 +0000 |
| Subject: | Re: How to document folders and other file types with phpDocumentor | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27117@lists.php.net to get a copy of this message | ||
On 4/23/07, Seyyed Sina Salek <sinasalek@gmail.com> wrote:
Is it possible to document project folders or other file types like (*.js , *.tgz, *.sql) with phpDocumentor?It is possible, but as I discovered when documenting javascript files, it could possibly break your webapp if your webserver isn't set to pass javascript files through the PHP interpreter. Knowing that the webserver would process the Javascript files, I had assumedI could include PHP blocks (<?php ?>) in the .js files, thereby allowing me to build phpdoc docblocks. Once I told PhpDocumentor to parse .js files (see the phpDocumentor.ini file for the list of file extensions it parses), it was generating documentation on my .js files for me (woohoo!!). Later, when I tried using the webapp, I found that those PHP blocks in the .js files were being passed to the browser as plain text, because my webserver was not configured to pass .js files through the PHP interpreter. Ouch! I've not attempted to use docblocks with other types of files (like .sql), but I would not think you could put docblocks in there that would be read properly by PhpDocumentor and not cause the file to be incorrectly read by its own interpreter. Some of the shell scripts included in PhpDocumentor have docblocks in them, but they have to be commented via that shell script's comment syntax (the # mark), which looks to me like preventsPhpDocumentor from recognizing the docblock. So, I have not had success using phpdoc docblocks to document non-PHP files. Then again, it's built for PHP, not the other languages, so any other language file that is able to be processed properly would be an "undocumented feature"... kind of like saying you're able to cook in your car by using a skillet on top of your hot-running motor ;) and can phpDocumentor generate hierarchial tree of project folders
structure?No, it's doesn't build a folder/file structure tree document. It sort of builds a package/subpackage tree as its left-side menu, but that's as close as it gets to what you're talking about. CRB