CPSC225/Notes/PhpDocumentor (Morelli)

PhpDocumentor, also known as phpdoc or phpdocu, is the current standard auto-documentation tool for the PHP language. It comes with an excellent tutorial. These notes just outline the main points, with links to the PhPdocumenter tutorial.

Why Document
Writing good documentation is essential for open-source software development. We will use PhpDoc to create documentation for both end-users and programmers.

Installing PhpDocumentor
If you have already installed PHP on your PC, then you can use PEAR (PHP Extension and Application Repository to install PhpDocumenter.

Installing phpDocumentor for use on the command-line is simple. Simply run one of the commands: $ pear install PhpDocumentor (Windows) $ sudo pear install PhpDocumentor (Linux or Mac) This will give you command-line access to phpdoc. To use the Web interface, you must first change one of PEAR's configuration variables, data_dir, to be a sub-directory of your web server's document root. The simplest way to do this is through PEAR's command-line interface with the command: $ pear config-set data_dir /path/to/document_root/pear To use the web interface, simply open PhpDocumentor in your browser -- e.g., on my Mac I use: http://localhost/~rmorelli/PhpDocumentor/.

Sample Documentation
See the sample program for an example of how to use PHP Documentation.

Tutorial
Use the PhpDoc Tutorial to get up to speed on standards, conventions, tags, and other important information.

Expectations
For this course, and any work we do on Sahana, the expectation is that your documentation will meet the PhpDocumentor standards.

Exercise
Download and install PhpDocumentor on your PC and use it to document your TwelveDays program.