Chapter 5. Writing Documentation

Table of Contents

1. phpDocumentor
Writing PHP Docs
Installation
Building the Documentation
2. DocBook v5.0
Building the Documentation
3. UML Diagrams

This section describes the documentation strategy.

1. phpDocumentor

phpDocumentor is used to process the API documentation directly from the PHP source code.

Writing PHP Docs

phpDocumentor behaves much like JavaDoc and Doc++. It looks for comment blocks starting with /** and uses them for documentation. It also has the smarts to pick apart the source code itself even without comment blocks. Finally it searches comment blocks for tags that start with the @ symbol. The tags can tell it what to do or provide special information like what an argument type and meaning is. See the phpDocumentor web site [PHPDOC-ORG] for more information.

Installation

  
  pear install XML_Parser 
  pear install XML_Util 
  pear install XML_Beautifier 
  pear install PhpDocumentor
      

Building the Documentation

The installation process will create documentation in the dist/htdocs/sakeApi directory.

  
    make clean 
    make phpdoc 
      

2. DocBook v5.0

DocBook version 5.0 is the file format for the User and Developer guides. It is an XML format that is easy to maintain and convert to many other formats. There are a lot of editors for DocBook documents. One such editor is the XMLmind XML Editor which was used to create this document. See DocBook.org [DOCBOOK-ORG] from more information.

Building the Documentation

The installation process will create documentation in the dist/htdocs directory.

  
    make clean 
    make userGuide 
    make devGuide
      

3. UML Diagrams

There are so many of these tools out there and attempts to choose just one, especially one that runs on all platforms to make design diagrams easier failed. It was hard to find a good free one. Since the original developer already owned a license to OmniGraffle, that is in use for now.