Symfony\Component\OptionsResolver\Options::set
Sets the value of a given option.
You can set lazy options by passing a closure with the following signature: <code> function (Options $options) </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 set(string
$option,
mixed
$value )
Parameters
$option
— string- The name of the option.
$value
— mixed- The value of the option.
Errors/Exceptions
-
OptionDefinitionException
- If options have already been read.