mediatekformation

ValidatorTypeGuesser
in package
implements FormTypeGuesserInterface

Interfaces, Classes, Traits and Enums

FormTypeGuesserInterface

Table of Contents

$metadataFactory  : mixed
__construct()  : mixed
guessMaxLength()  : ValueGuess|null
Returns a guess about the field's maximum length.
guessMaxLengthForConstraint()  : ValueGuess|null
Guesses a field's maximum length based on the given constraint.
guessPattern()  : ValueGuess|null
Returns a guess about the field's pattern.
guessPatternForConstraint()  : ValueGuess|null
Guesses a field's pattern based on the given constraint.
guessRequired()  : ValueGuess|null
Returns a guess whether a property of a class is required.
guessRequiredForConstraint()  : ValueGuess|null
Guesses whether a field is required based on the given constraint.
guessType()  : TypeGuess|null
Returns a field guess for a property name of a class.
guessTypeForConstraint()  : TypeGuess|null
Guesses a field class name for a given constraint.
guess()  : Guess|null
Iterates over the constraints of a property, executes a constraints on them and returns the best guess.

Properties

Methods

guessMaxLength()

Returns a guess about the field's maximum length.

public guessMaxLength(mixed $class, mixed $property) : ValueGuess|null
Parameters
$class : mixed

The fully qualified class name

$property : mixed

The name of the property to guess for

Return values
ValueGuess|null

A guess for the field's maximum length

guessPattern()

Returns a guess about the field's pattern.

public guessPattern(mixed $class, mixed $property) : ValueGuess|null
Parameters
$class : mixed

The fully qualified class name

$property : mixed

The name of the property to guess for

Return values
ValueGuess|null

A guess for the field's required pattern

guessRequired()

Returns a guess whether a property of a class is required.

public guessRequired(mixed $class, mixed $property) : ValueGuess|null
Parameters
$class : mixed

The fully qualified class name

$property : mixed

The name of the property to guess for

Return values
ValueGuess|null

A guess for the field's required setting

guessType()

Returns a field guess for a property name of a class.

public guessType(mixed $class, mixed $property) : TypeGuess|null
Parameters
$class : mixed

The fully qualified class name

$property : mixed

The name of the property to guess for

Return values
TypeGuess|null

A guess for the field's type and options

guess()

Iterates over the constraints of a property, executes a constraints on them and returns the best guess.

protected guess(string $class, string $property, Closure $closure[, mixed $defaultValue = null ]) : Guess|null
Parameters
$class : string

The class to read the constraints from

$property : string

The property for which to find constraints

$closure : Closure

The closure that returns a guess for a given constraint

$defaultValue : mixed = null

The default value assumed if no other value can be guessed

Return values
Guess|null

The guessed value with the highest confidence

Search results