mediatekformation

FormTypeGuesserInterface

Tags
author

Bernhard Schussek bschussek@gmail.com

Table of Contents

guessMaxLength()  : ValueGuess|null
Returns a guess about the field's maximum length.
guessPattern()  : ValueGuess|null
Returns a guess about the field's pattern.
guessRequired()  : ValueGuess|null
Returns a guess whether a property of a class is required.
guessType()  : TypeGuess|null
Returns a field guess for a property name of a class.

Methods

guessMaxLength()

Returns a guess about the field's maximum length.

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

The fully qualified class name

$property : string

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(string $class, string $property) : ValueGuess|null
  • When you have a min value, you guess a min length of this min (LOW_CONFIDENCE)
  • Then line below, if this value is a float type, this is wrong so you guess null with MEDIUM_CONFIDENCE to override the previous guess. Example: You want a float greater than 5, 4.512313 is not valid but length(4.512314) > length(5)
Parameters
$class : string

The fully qualified class name

$property : string

The name of the property to guess for

Tags
see
https://github.com/symfony/symfony/pull/3927
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(string $class, string $property) : ValueGuess|null
Parameters
$class : string

The fully qualified class name

$property : string

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(string $class, string $property) : TypeGuess|null
Parameters
$class : string

The fully qualified class name

$property : string

The name of the property to guess for

Return values
TypeGuess|null

A guess for the field's type and options

Search results