phpDocumentor

Version2
in package
implements ConfigurationInterface, Upgradable

FinalYes
Tags
psalm-type

ConfigurationMap = array

psalm-import-type

BaseConfiguration from Version3 as UpgradedConfiguration

Table of Contents

Interfaces

ConfigurationInterface
Upgradable

Properties

$defaultTemplateName  : string

Methods

__construct()  : mixed
getConfigTreeBuilder()  : TreeBuilder
upgrade()  : UpgradedConfiguration
Upgrades the version 2 configuration to the version 3 pre-normalized configuration.
convertSingleStarPathEndingIntoGlobPattern()  : string
Make a `/*` ending backwards compatible for v2.

Properties

$defaultTemplateName read-only

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

getConfigTreeBuilder()

public getConfigTreeBuilder() : TreeBuilder
Return values
TreeBuilder

upgrade()

Upgrades the version 2 configuration to the version 3 pre-normalized configuration.

public upgrade(ConfigurationMap $values) : UpgradedConfiguration
Parameters
$values : ConfigurationMap
Return values
UpgradedConfiguration

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
Tags
link
https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html
Return values
string

        
On this page

Search results