phpdoc
generates API documentation from PHP source code
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.
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
$
# DOCBLOCK FORMAT
/**# DOCBLOCK FORMAT
* Short description.
*
* Long description.
*
* @param string $name The name
* @return bool Success status
* @throws Exception On failure
*/
$
# CONFIGURATION (phpdoc.xml)
<?xml version="1.0"?># CONFIGURATION (phpdoc.xml)
<phpdocumentor>
<paths>
<output>docs</output>
</paths>
<source>
<path>src</path>
</source>
</phpdocumentor>
