Open main menu

PhpDocumentor

Revision as of 16:11, 3 November 2008 by Freephile (talk | contribs)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

Background

Written by Josh Eichorn and Greg Beaver, wp:phpDocumentor is the implementation of the wp:PHPDoc standard for documenting your PHP code. It is similar to, and in fact based on the wp:Javadoc standard. Other capable documentation generators include wp:Doxygen and wp:ROBODoc. phpDocumentor is notable in it's depth for understanding PHP code, and also for the ability to generate output in Docbook, pdf, chm or XML formats in addition to HTML.

The release of phpDocumentor 1.2.0+ marks a radical shift in the design philosophy of phpDocumentor. No longer is this tool intended only to generate documentation from the source code. Now it facilitates generating user-level documentation for people who only wish to use your software, and not to modify it. This allows complete integration of all the documentation for the software project, and that means even greater ease of documenting, and ultimately more time to work on making the software work!

Howto use the system

  1. The first step is to write properly formatted comments in your source code
  2. Second, optionally, create external documentation in a variety of formats including DocBook (and comment your sources to 'link' to them)
  3. Generate the documentation from the sources

The main resource is the Project website, including tutorials and full Documentation. The system can be installed via the PEAR installer

The system can be run via command-line interface, or through a browser interface. The browser interface makes it easy to do one-offs, while the command-line interface makes it easy to do repeatable, automated documentation generation (like nightly API updates).

phpdoc --target /var/www/docs/mediawiki --output HTML:Smarty:HandS --directory /home/user/work/project/vendorsrc/mediawiki/current/

See Also

API

phpdoc --help