Processor
in package
This class is the entry point for config normalization/merging/finalization.
Tags
Table of Contents
- normalizeConfig() : array<string|int, mixed>
- Normalizes a configuration entry.
- process() : array<string|int, mixed>
- Processes an array of configurations.
- processConfiguration() : array<string|int, mixed>
- Processes an array of configurations.
Methods
normalizeConfig()
Normalizes a configuration entry.
public
static normalizeConfig(array<string|int, mixed> $config, string $key[, string|null $plural = null ]) : array<string|int, mixed>
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:extensiontwig.extension.foo</twig:extension> twig:extensiontwig.extension.bar</twig:extension>
And the same configuration in YAML:
extensions: ['twig.extension.foo', 'twig.extension.bar']
Parameters
- $config : array<string|int, mixed>
-
A config array
- $key : string
-
The key to normalize
- $plural : string|null = null
-
The plural form of the key if it is irregular
Return values
array<string|int, mixed> —process()
Processes an array of configurations.
public
process(NodeInterface $configTree, array<string|int, mixed> $configs) : array<string|int, mixed>
Parameters
- $configTree : NodeInterface
- $configs : array<string|int, mixed>
-
An array of configuration items to process
Return values
array<string|int, mixed> —processConfiguration()
Processes an array of configurations.
public
processConfiguration(ConfigurationInterface $configuration, array<string|int, mixed> $configs) : array<string|int, mixed>
Parameters
- $configuration : ConfigurationInterface
- $configs : array<string|int, mixed>
-
An array of configuration items to process