Symfony\Component\OptionsResolver\Options::setNormalizer
Sets the normalizer for a given option.
Normalizers should be closures with the following signature: <code> function (Options $options, $value) </code> This closure will be evaluated once the option is read using . The closure has access to the resolved values of other options through the passed instance.
Signature
public function setNormalizer(string
$option,
Closure
$normalizer )
Parameters
$option
— string- The name of the option.
$normalizer
— \Closure- The normalizer.
Errors/Exceptions
-
OptionDefinitionException
- If options have already been read.