Processor::normalizeConfig()

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.footwig.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
doc_Symfony
2016-10-28 06:27:09
Comments
Leave a Comment

Please login to continue.