OptionsResolver::setAllowedTypes()

OptionsResolver setAllowedTypes(string $option, string|string[] $allowedTypes)

Sets allowed types for an option.

Any type for which a corresponding is_() function exists is acceptable. Additionally, fully-qualified class or interface names may be passed.

Parameters

string $option The option name
string|string[] $allowedTypes One or more accepted types

Return Value

OptionsResolver This instance

Exceptions

UndefinedOptionsException If the option is undefined
AccessException If called from a lazy option or normalizer
doc_Symfony
2016-10-28 06:25:17
Comments
Leave a Comment

Please login to continue.