W3cubDocs

/Symfony 4.1

Processor

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

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

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

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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Config/Definition/Processor.html