Php documentor

800 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Php documentor

  1. 1. PHPDocumentor Tricode Professional Services www.tricode.nl 16-05-2008 Sander van Beek
  2. 2. Background <ul><li>Why document code? </li></ul><ul><li>Code is easier to: </li></ul><ul><li>Understand </li></ul><ul><li>Maintain </li></ul><ul><li>Debug </li></ul><ul><li>Extend </li></ul>
  3. 3. Background <ul><li>Two types of documentation for software: </li></ul><ul><li>End-user: How to use the software? </li></ul><ul><li>Technical: How does the software work ? </li></ul>
  4. 4. Overview <ul><li>PHPDocumentor: </li></ul><ul><li>Standardize documentation format & generation of a documentation package from comments in source code </li></ul><ul><li>Based on JavaDoc (and sometimes referred to as PHPDoc)‏ </li></ul>
  5. 5. Overview <ul><li>Supported export formats (extendable) </li></ul><ul><li>PDF </li></ul><ul><li>HTML (smarty templates) </li></ul><ul><li>CHM </li></ul><ul><li>Docbook XML </li></ul>
  6. 6. Basic syntax <ul><li>/** */ style comments </li></ul><ul><li>@<tagname> [options] </li></ul><ul><li>Example: </li></ul><ul><li>/** </li></ul><ul><li>* @author John Doe </li></ul><ul><li>*/ </li></ul>
  7. 7. Popular tags <ul><li>@param </li></ul><ul><li>@return </li></ul><ul><li>@throws </li></ul><ul><li>@var </li></ul><ul><li>@author </li></ul><ul><li>@example </li></ul><ul><li>@package </li></ul><ul><li>@subpackage </li></ul>@copyright @license @link @tutorial @todo @version
  8. 8. Less frequently used <ul><li>@deprecated </li></ul><ul><li>@since </li></ul><ul><li>@category </li></ul><ul><li>@filesource </li></ul><ul><li>@global </li></ul><ul><li>@ignore </li></ul><ul><li>@internal </li></ul><ul><li>@method </li></ul>@property @name @see @uses @staticvar
  9. 9. Deprecated (php4)‏ <ul><li>@abstract </li></ul><ul><li>@access </li></ul><ul><li>@final </li></ul><ul><li>@static </li></ul>
  10. 10. References http://www.phpdoc.org http://www.akadia.com/services/cvs_howto.html

×