phpdoc
TLDR
Generate documentation
$ phpdoc -d [src/] -t [docs/]
Specify config file$ phpdoc -c [phpdoc.xml]
Generate with specific template$ phpdoc -d [src/] -t [docs/] --template="clean"
Parse single file$ phpdoc -f [file.php] -t [docs/]
SYNOPSIS
phpdoc [options]
DESCRIPTION
phpDocumentor (phpdoc) generates API documentation from PHP source code. It parses DocBlock comments to create navigable HTML documentation.
PARAMETERS
-d, --directory path
Source directory.-f, --filename file
Single file to parse.-t, --target path
Output directory.-c, --config file
Configuration file.--template name
Template to use.--ignore pattern
Patterns to ignore.
EXAMPLES
$ # Basic documentation
phpdoc -d ./src -t ./docs
# With configuration
phpdoc -c phpdoc.dist.xml
# Ignore tests
phpdoc -d ./src -t ./docs --ignore="tests/*"
# Verbose output
phpdoc -v -d ./src -t ./docs
phpdoc -d ./src -t ./docs
# With configuration
phpdoc -c phpdoc.dist.xml
# Ignore tests
phpdoc -d ./src -t ./docs --ignore="tests/*"
# Verbose output
phpdoc -v -d ./src -t ./docs
DOCBLOCK FORMAT
$ /**
* Short description.
*
* Long description.
*
* @param string $name The name
* @return bool Success status
* @throws Exception On failure
*/
* Short description.
*
* Long description.
*
* @param string $name The name
* @return bool Success status
* @throws Exception On failure
*/
CONFIGURATION (phpdoc.xml)
$ <?xml version="1.0"?>
<phpdocumentor>
<paths>
<output>docs</output>
</paths>
<source>
<path>src</path>
</source>
</phpdocumentor>
<phpdocumentor>
<paths>
<output>docs</output>
</paths>
<source>
<path>src</path>
</source>
</phpdocumentor>
CAVEATS
Requires proper DocBlocks. Large projects take time to process. Template quality varies.
HISTORY
phpDocumentor was created by Joshua Eichorn and is now maintained by Mike van Riel and the community.


