OptionsResolverInterface deprecated::setOptional()

OptionsResolverInterface setOptional(array $optionNames)

Sets optional options.

This method declares valid option names without setting default values for them. If these options are not passed to {@link resolve()} and no default has been set for them, they will be missing in the final options array. This can be helpful if you want to determine whether an option has been set or not because otherwise {@link resolve()} would trigger an exception for unknown options.

Parameters

array $optionNames A list of option names.

Return Value

OptionsResolverInterface The resolver instance.
doc_Symfony
2016-10-28 06:25:21
Comments
Leave a Comment

Please login to continue.