PhpDocumentor

From Freephile Wiki
Jump to navigation Jump to search

Background[edit | edit source]

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[edit | edit source]

  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[edit | edit source]

API

phpdoc --help