Symfony\Component\Form\Guess\Guess
Base class for guesses made by TypeGuesserInterface implementation
Each instance contains a confidence value about the correctness of the guess.
Thus an instance with confidence HIGH_CONFIDENCE is more likely to be
correct than an instance with confidence LOW_CONFIDENCE.
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
class Guess
{
- // constants
- const VERY_HIGH_CONFIDENCE = 3;
- const HIGH_CONFIDENCE = 2;
- const MEDIUM_CONFIDENCE = 1;
- const LOW_CONFIDENCE = 0;
- // members
- private integer $confidence;
- // methods
- public static Guess getBestGuess()
- public void __construct()
- public integer getConfidence()
Hierarchy
Constants
Name | Value |
---|---|
VERY_HIGH_CONFIDENCE | 3 |
HIGH_CONFIDENCE | 2 |
MEDIUM_CONFIDENCE | 1 |
LOW_CONFIDENCE | 0 |
Members
private
- $confidence
—
integer
The confidence about the correctness of the value
Methods
public
- __construct() — Constructor
- getBestGuess() — Returns the guess most likely to be correct from a list of guesses
- getConfidence() — Returns the confidence that the guessed value is correct