phpDocumentor

Version2
in package
implements ConfigurationInterface, Upgradable

Tags
psalm-type

ConfigurationMap = array

psalm-import-type

BaseConfiguration from Version3 as UpgradedConfiguration

Interfaces, Classes, Traits and Enums

ConfigurationInterface
Upgradable

Table of Contents

$defaultTemplateName  : string
__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

private string $defaultTemplateName

This is injected so that the name of the default template can be defined globally in the app

Tags

Methods

__construct()

public __construct(string $defaultTemplateName) : mixed
Parameters
$defaultTemplateName : string
Tags
Return values
mixed

getConfigTreeBuilder()

public getConfigTreeBuilder() : TreeBuilder
Tags
Return values
TreeBuilder

upgrade()

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

public upgrade(ConfigurationMap $values) : UpgradedConfiguration
Parameters
$values : ConfigurationMap
Tags
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

        

Search results