class ValidatorTypeGuesser implements FormTypeGuesserInterface
__construct(MetadataFactoryInterface $metadataFactory) | ||
TypeGuess|null | guessType(string $class, string $property) Returns a field guess for a property name of a class. | |
ValueGuess | guessRequired(string $class, string $property) Returns a guess whether a property of a class is required. | |
ValueGuess|null | guessMaxLength(string $class, string $property) Returns a guess about the field's maximum length. | |
ValueGuess|null | guessPattern(string $class, string $property) Returns a guess about the field's pattern. | |
TypeGuess|null | guessTypeForConstraint(Constraint $constraint) Guesses a field class name for a given constraint. | |
ValueGuess|null | guessRequiredForConstraint(Constraint $constraint) Guesses whether a field is required based on the given constraint. | |
ValueGuess|null | guessMaxLengthForConstraint(Constraint $constraint) Guesses a field's maximum length based on the given constraint. | |
ValueGuess|null | guessPatternForConstraint(Constraint $constraint) Guesses a field's pattern based on the given constraint. | |
Guess|null | guess(string $class, string $property, Closure $closure, mixed $defaultValue = null) Iterates over the constraints of a property, executes a constraints on them and returns the best guess. |
MetadataFactoryInterface | $metadataFactory |
Returns a field guess for a property name of a class.
string | $class | The fully qualified class name |
string | $property | The name of the property to guess for |
TypeGuess|null | A guess for the field's type and options |
Returns a guess whether a property of a class is required.
string | $class | The fully qualified class name |
string | $property | The name of the property to guess for |
ValueGuess | A guess for the field's required setting |
Returns a guess about the field's maximum length.
string | $class | The fully qualified class name |
string | $property | The name of the property to guess for |
ValueGuess|null | A guess for the field's maximum length |
Returns a guess about the field's pattern.
string | $class | The fully qualified class name |
string | $property | The name of the property to guess for |
ValueGuess|null | A guess for the field's required pattern |
Guesses a field class name for a given constraint.
Constraint | $constraint |
TypeGuess|null | The guessed field class and options |
Guesses whether a field is required based on the given constraint.
Constraint | $constraint |
ValueGuess|null | The guess whether the field is required |
Guesses a field's maximum length based on the given constraint.
Constraint | $constraint |
ValueGuess|null | The guess for the maximum length |
Guesses a field's pattern based on the given constraint.
Constraint | $constraint |
ValueGuess|null | The guess for the pattern |
Iterates over the constraints of a property, executes a constraints on them and returns the best guess.
string | $class | The class to read the constraints from |
string | $property | The property for which to find constraints |
Closure | $closure | The closure that returns a guess for a given constraint |
mixed | $defaultValue | The default value assumed if no other value can be guessed |
Guess|null | The guessed value with the highest confidence |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.html