phpDocumentor

phpdocumentor

Documentation reference

configVersion

Default

3

title

Will be the title of your documentation set.

Default

Documentation

use-cache

By default phpDocumentor uses a lot of caching to speed up re-runs. Disabling this cache will have impact on the resources consumed by phpDocumentor and the time to complete the rendering. Set this setting to false will disable all cache usage.

Default

true

paths

Paths can be used to configure the output and cache directory.

By separating the output locations into one for the parser and one for the transformation process it is possible to provide a staging location where you indefinitely store your structure file and benefit from the increased speed when doing multiple runs. This is called Incremental Processing or Incremental Parsing .

phpDocumentor automatically uses the cache directory when possible there is way to configure this.

output

Default

.phpdoc/build

cache

Default

.phpdoc/cache

versions

number

Default

1.0.0

folder

Default

apis

format

The language of your code.

phpDocumentor's internals are prepared to support multiple languages. Right now only php is supported.

Default

php
visibilities

Visibilities are setting the deepest level of elements that will be rendered in your documentation. The values can be combined to fine tune the output. By default phpDocumentor includes all elements unless they are marked as @internal

Api will render only the elements marked as part of your api using the @api tag. Public will filter all public elements from your project and render them in to the documentation. Protected will filter all public elements from your project and render them in to the documentation. Private will filter all public elements from your project and render them in to the documentation.

It is possible to configure multiple visibitities. When you combine public and private all non internal public and private elements will be included. If you add internal also the internal elements will be added.

Adding api as value will filter all elements that are part of your api.

Example

<visibilities>public</visibilities>
<visibilities>protected</visibilities>
default-package-name

When your source code is grouped using the @package tag; what is the name of the default package when none is provided?

Default

Application
encoding

Default

utf-8
source

Where should phpDocumentor start looking for your code? In this configration section you can configure the DSN to your code base.

The source can be configured using 2 parts. DSN which points to the root of your code base and paths which specify which folders should be read. Paths can be used to be more specific which folders should be included. All other paths in the root will be ignored.

Future versions of phpDocumentor will support other DSN formats rather then just local paths. Right now only file:// is supported

Paths do support glob patterns to be able to include only particular sub directories. The example below will only include files in your DSN root directory src and it's sub directories, when the file name matches *Interface.php

<path>/src/**/*Interface.php</path>

The paths in source are relative to the dsn ; It is not possible to use absolute paths in a path.

dsn

Default

.
paths
output

Default

.
ignore
hidden

Default

true
paths
ignore-tags
extensions
include-source

Should phpDocumentor include your source code in the rendered documentation? By including your source code people reading your docs can jump directly from the docs to a rendered version of the source code. Which allows them to get more details about a method or function implementation.

By default source code is not included in the rendered documentation. Unless the file contains a @filesource tag.

This setting can be overridden by using the --sourcecode or --no-sourcecode command line option.

Default

null
examples

Examples are code snippets that can be included in your docblocks. This setting will configure where phpDocumentor can find them. The paths used in your docblock @example tags are relative to this dsn. For more information about @example please consult the tag reference.

dsn

Default

.
paths
validate

Default

false
markers

guides

format

Default

rst
source

Where should phpDocumentor start looking for your code? In this configuration section you can configure the DSN to your code base.

The source can be configured using 2 parts. DSN which points to the root of your code base and paths which specify which folders should be read. Paths can be used to be more specific which folders should be included. All other paths in the root will be ignored.

Future versions of phpDocumentor will support other DSN formats rather then just local paths. Right now only file:// is supported

Paths do support glob patterns to be able to include only particular sub directories. The example below will only include files in your DSN root directory src and it's sub directories, when the file name matches *Interface.php

<path>/src/**/*Interface.php</path>

The paths in source are relative to the dsn ; It is not possible to use absolute paths in a path.

dsn

Default

.
paths
output

Default

docs

settings

Some settings are not part of the normal configuration parts of phpDocumentor. Because there have impact on the full application behavior, or enable experimental parts in phpDocumentor.

Settings are key-value configuration options, which are listed with the following command:

$ phpdoc --list-settings

name

value

templates

name

Default

default

location

[optional] The path where the template can be found. Unless your project uses a custom template in a specific folder, this attribute should not be provided. When provided, phpDocumentor will load your template from that folder.

When a relative folder is provided, phpDocumentor will attempt to find that relative to the location of your configuration file. An absolute path is also allowed for when you have multiple projects that should use the same template.

For example: When the location my/phpdoc/templates is provided and myTemplate as name, phpDocumentor will attempt to load the template configuration at [configPath]/my/phpdoc/templates/myTemplate/template.xml .

parameters

name
value

Search results