class Processor

This class is the entry point for config normalization/merging/finalization.

Methods

array
process(NodeInterface $configTree, array $configs)

Processes an array of configurations.

array
processConfiguration(ConfigurationInterface $configuration, array $configs)

Processes an array of configurations.

static array
normalizeConfig(array $config, string $key, string $plural = null)

Normalizes a configuration entry.

Details

at line line 29
array process(NodeInterface $configTree, array $configs)

Processes an array of configurations.

Parameters

NodeInterface $configTree The node tree describing the configuration
array $configs An array of configuration items to process

Return Value

array The processed configuration

at line line 48
array processConfiguration(ConfigurationInterface $configuration, array $configs)

Processes an array of configurations.

Parameters

ConfigurationInterface $configuration The configuration class
array $configs An array of configuration items to process

Return Value

array The processed configuration

at line line 76
static array normalizeConfig(array $config, string $key, string $plural = null)

Normalizes a configuration entry.

This method returns a normalize configuration array for a given key to remove the differences due to the original format (YAML and XML mainly).

Here is an example.

The configuration in XML:

twig.extension.foo twig.extension.bar

And the same configuration in YAML:

extensions: ['twig.extension.foo', 'twig.extension.bar']

Parameters

array $config A config array
string $key The key to normalize
string $plural The plural form of the key if it is irregular

Return Value

array