ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾PHP ±à³Ì£¾PHP 5 Power programming
Team LiB
Previous Section Next Section

B.1. Introduction

Besides coding standards, the PEAR project has a standard method of documentation classes and packages. This method makes use of the phpDocumentor tool to generate browseable documentation in HTML from comments in the source of the classes. The official tool to document PEAR classes is phpDocumentor (http://phpdoc.org), which cannot only generate browseable HTML, but also PDF and Docbook XML. It very much resembles JavaDoc (http://java.sun.com/j2se/javadoc/) and has a similar "markup language" for documenting elements. You can install phpDocumentor with the following command:

$ pear install phpDocumentor

There is also an implementation by Alan Knowles at http://www.akbkhome.com/Projects/PHP_CodeDoc/. This appendix introduces you to the official phpDocumentor tool, along with examples on how to use the tool and how to document your classes.

    Team LiB
    Previous Section Next Section