Version2
in package
implements
ConfigurationInterface, Upgradable
Interfaces, Classes and Traits
- ConfigurationInterface
- Configuration interface.
- Upgradable
Table of Contents
- $defaultTemplateName : string
- __construct() : mixed
- getConfigTreeBuilder() : TreeBuilder
- Generates the configuration tree builder.
-
upgrade()
: array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, version?: array{: array{api: array{: array{default-package-name: string, extensions: array{extensions: array
}, ignore: array{paths: array }, markers: array{markers: array }, source: array{paths: array }, visibilities: non-empty-list }}, number: string}}} - Upgrades the version 2 configuration to the version 3 configuration.
- convertSingleStarPathEndingIntoGlobPattern() : string
- Make a `/*` ending backwards compatible for v2.
Properties
$defaultTemplateName
private
string
$defaultTemplateName
This is injected so that the name of the default template can be defined globally in the app
Methods
__construct()
public
__construct(string $defaultTemplateName) : mixed
Parameters
- $defaultTemplateName : string
Return values
mixed —getConfigTreeBuilder()
Generates the configuration tree builder.
public
getConfigTreeBuilder() : TreeBuilder
Return values
TreeBuilder —upgrade()
Upgrades the version 2 configuration to the version 3 configuration.
public
upgrade(array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, versions?: array, settings?: array, templates?: non-empty-list, transformer: array{target: string}, parser: array{target: string, default-package-name: string, extensions: array{extensions: array}, visibility: string, markers: array{items: array}}, files: array{files: array, directories: array, ignores: array}, transformations: array{templates: string[]}} $values) : array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, version?: array{: array{api: array{: array{default-package-name: string, extensions: array{extensions: array}, ignore: array{paths: array}, markers: array{markers: array}, source: array{paths: array}, visibilities: non-empty-list}}, number: string}}}
Parameters
-
$values
: array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, versions?: array
, settings?: array, templates?: non-empty-list , transformer: array{target: string}, parser: array{target: string, default-package-name: string, extensions: array{extensions: array}, visibility: string, markers: array{items: array}}, files: array{files: array, directories: array, ignores: array}, transformations: array{templates: string[]}}
Tags
Return values
array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, version?: array{: array{api: array{: array{default-package-name: string, extensions: array{extensions: array, settings?: array
convertSingleStarPathEndingIntoGlobPattern()
Make a `/*` ending backwards compatible for v2.
private
convertSingleStarPathEndingIntoGlobPattern(string $path) : string
In phpDocumentor 3 we started adopting the glob pattern with globstar extension to properly define patterns matching file paths. This is incompatible with phpDocumentor 2, that interpreted a * to mean any number of characters, including the path separator.
To ensure this behaviour is properly translated, this method will detect if a path ends with /*, and if it is not a globstar pattern, we convert it to one. This matches the behaviour in phpDocumentor 2 without user interaction.
Parameters
- $path : string