PhpDocumentor2 is a program that can analyze php source code and comment blocks and generate documents. Inspired by phpdocumentor1 and javadoc, phpdocumentor1 has consistently innovated some new technologies and new features supporting php.
Official Website address: http://www.phpdoc.org/
Project address: https://github.com/phpDocumentor/phpDocumentor2
PhpDocumentor 2 is a program that can analyze php source code and comment blocks and generate documents.
Inspired by phpjavasentor 1 and javadoc, it continues to use innovative new technologies and new features supporting php.
Phpbench entor 2 features:
Compatible with php5.3 and fully supports namespaces and closures.
Recognition supports any tag and some append (such as @ link ).
Faster processing speed. It significantly reduces the processing time of phpworker entor 1 under Zend Framework.
Low memory consumption. the memory consumption for small and medium-sized projects is less than 20 MB, 40 MB, and 100 MB, respectively.
Incremental resolution. If you have the structure. xml file obtained by running phpdoc, the speed of re-generating the document after a small modification will be increased by 80%.
You can simply create a template, with only one small step and three files being edited.
Compatible with 1-generation command lines. For example, -- directory, -- file and -- target
Two-step processing. First, generate the structure file. you can format the relevant information based on this file and use your own tools to display the information!
Installation Requirements:
PHP 5.3.3 or higher
Ext/iconv, http://php.net/manual/en/book.iconv.php (enabled by default since PHP 5.0.0)
Ext/intl, http://php.net/manual/en/book.intl.php
The XSL extension, http://www.php.net/manual/en/book.xsl.php (optional, used only when using The xsl template)
Graphviz (optional) used to generate class diagrams)
Install phpDocumentor 2
1. install on pear:
Download pear http://pear.php.net/go-pear.phar
Put the go-pear.phar under the PHP Directory
Run the following command:
The code is as follows:
Php go-pear.phar
Enter system
Then press enter to complete installation.
2. install the tools used for class link plotting:
The code is as follows:
Pear install image_graphviz
Download http://www.graphviz.org/Download_windows.php graphviz-2.38.msi
After installation, check whether the bin path has been added to the environment variable path,
The following is an important step: restart your computer; otherwise, it will not take effect.
3. install phpDocumentor
The code is as follows:
Pear channel-discover pear.phpdoc.org // register a channel
Pear remote-list-c phpdoc // list available versions
Pear install phpdoc/phpDocumentor // install phpDocumentor
For details, refer to: http://pear.phpdoc.org/
Installation steps are complete!
Tip:
The directories after the two software are installed are under pear in PHP:
Php/pear/php#entor
Php/pear/Image
Use phpjavasentor 2
The following documents are generated:
Under the PHP root directory:
The code is as follows:
Phpdoc-d project absolute path-t generated file storage path
D indicates the path directory, and t indicates the target. Alternatively, you can select-f to specify a single file. After creating a path, wait a moment and you will be able to see the instructions in the target folder.
Example:
The code is as follows:
Phpdoc-d E: \ bak \ video \ code-t E: \ bak \ video \ code \ doc
E: \ bak \ video \ code is the php code folder
E: \ bak \ video \ code \ doc is the folder for generating documents
The specific parameters are as follows:
The code is as follows:
Project: run [-t | -- target [= "... "] [-f | -- filename [= "... "] [-d | -- directory [= "... "] [-e | -- extensions [= "... "] [-I | -- ignore [= "... "] [-- ignore-tags [= "... "] [-- hidden] [-- ignore-symlinks] [-m | -- markers [= "... "] [-- title [= "... "] [-- force] [-- validate] [-- visibility [= "... "] [-- defaultpackagename [= "... "] [-- sourcecode] [-p | -- progressbar] [-- template [= "... "] [-- parseprivate] [-c | -- config [= "... "]