\phpDocumentor\ConfigurationSymfonyConfigFactory

Summary

Methods
Properties
Constants
__construct()
createFromFile()
createDefault()
No public properties found
FIELD_CONFIG_VERSION
DEFAULT_CONFIG_VERSION
No protected methods found
No protected properties found
N/A
generateConfiguration()
processConfiguration()
findDefinition()
upgradeConfiguration()
$configurationDefinitions
N/A

Constants

FIELD_CONFIG_VERSION

FIELD_CONFIG_VERSION = 'configVersion'

DEFAULT_CONFIG_VERSION

DEFAULT_CONFIG_VERSION = '2'

Properties

$configurationDefinitions

$configurationDefinitions : \Symfony\Component\Config\Definition\ConfigurationInterface[]

Type

\Symfony\Component\Config\Definition\ConfigurationInterface[] —

Methods

__construct()

__construct(\Symfony\Component\Config\Definition\ConfigurationInterface[]  $definitions) : mixed

Parameters

\Symfony\Component\Config\Definition\ConfigurationInterface[] $definitions

Returns

mixed —

createFromFile()

createFromFile(string  $filename) : \phpDocumentor\Configuration\ConfigurationMap

Parameters

string $filename

Returns

\phpDocumentor\Configuration\ConfigurationMap —

createDefault()

createDefault() : \phpDocumentor\Configuration\ConfigurationMap

Returns

\phpDocumentor\Configuration\ConfigurationMap —

generateConfiguration()

generateConfiguration(array  $values) : \phpDocumentor\Configuration\ConfigurationMap

Parameters

array $values

Returns

\phpDocumentor\Configuration\ConfigurationMap —

processConfiguration()

processConfiguration(array  $values) : array

Normalizes and validates the given values.

When this version of the configuration can be upgraded (which is detected by the Upgradable interface on the Configuration definition) then it will do so and re-run this method with the upgraded values. The 'configVersion' field will tell which definition should be used; when none is provided then a version 2 configuration is assumed.

Parameters

array $values

because this method is called recursively, the provided shape varies and is the output of the ConfigurationDefinition matching the prior configVersion is used.

Returns

array —

the recursiveness of this method means that the output of this method has the shape of the current ConfigurationDefinition's output.

findDefinition()

findDefinition(string  $configurationVersion) : \Symfony\Component\Config\Definition\ConfigurationInterface

Parameters

string $configurationVersion

Returns

\Symfony\Component\Config\Definition\ConfigurationInterface —

upgradeConfiguration()

upgradeConfiguration(\phpDocumentor\Configuration\Definition\Upgradable  $definition, array  $configuration) : array

Parameters

\phpDocumentor\Configuration\Definition\Upgradable $definition
array $configuration

because this method is called as part of the recursive method processConfiguration, the provided shape varies and is the output of the normalisation process of provided ConfigurationDefinition.

Returns

array —

this method's output will match the shape of the output of the provided ConfigurationDefinition.