ValueGuess.php 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Form\Guess;
  11. /**
  12. * Contains a guessed value.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. class ValueGuess extends Guess
  17. {
  18. private $value;
  19. /**
  20. * @param string|int|bool|null $value The guessed value
  21. * @param int $confidence The confidence that the guessed class name
  22. * is correct
  23. */
  24. public function __construct($value, int $confidence)
  25. {
  26. parent::__construct($confidence);
  27. $this->value = $value;
  28. }
  29. /**
  30. * Returns the guessed value.
  31. *
  32. * @return string|int|bool|null
  33. */
  34. public function getValue()
  35. {
  36. return $this->value;
  37. }
  38. }