OptionsResolver::addAllowedTypes()

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

Adds allowed types for an option.

The types are merged with the allowed types defined previously.

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:13
Comments
Leave a Comment

Please login to continue.