OptionsResolver::resolve()

array resolve(array $options = array())

Merges options with the default values stored in the container and validates them.

Exceptions are thrown if:

  • Undefined options are passed;
  • Required options are missing;
  • Options have invalid types;
  • Options have invalid values.

Parameters

array $options A map of option names to values

Return Value

array The merged and validated options

Exceptions

UndefinedOptionsException If an option name is undefined
InvalidOptionsException If an option doesn't fulfill the specified validation rules
MissingOptionsException If a required option is missing
OptionDefinitionException If there is a cyclic dependency between lazy options and/or normalizers
NoSuchOptionException If a lazy option reads an unavailable option
AccessException If called from a lazy option or normalizer
doc_Symfony
2016-10-28 06:25:16
Comments
Leave a Comment

Please login to continue.