aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/form/Symfony/Component/Form/Guess/TypeGuess.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/Guess/TypeGuess.php')
-rw-r--r--vendor/symfony/form/Symfony/Component/Form/Guess/TypeGuess.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/Guess/TypeGuess.php b/vendor/symfony/form/Symfony/Component/Form/Guess/TypeGuess.php
new file mode 100644
index 00000000..3241e603
--- /dev/null
+++ b/vendor/symfony/form/Symfony/Component/Form/Guess/TypeGuess.php
@@ -0,0 +1,70 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Form\Guess;
13
14/**
15 * Contains a guessed class name and a list of options for creating an instance
16 * of that class
17 *
18 * @author Bernhard Schussek <bschussek@gmail.com>
19 */
20class TypeGuess extends Guess
21{
22 /**
23 * The guessed field type
24 * @var string
25 */
26 private $type;
27
28 /**
29 * The guessed options for creating an instance of the guessed class
30 * @var array
31 */
32 private $options;
33
34 /**
35 * Constructor
36 *
37 * @param string $type The guessed field type
38 * @param array $options The options for creating instances of the
39 * guessed class
40 * @param integer $confidence The confidence that the guessed class name
41 * is correct
42 */
43 public function __construct($type, array $options, $confidence)
44 {
45 parent::__construct($confidence);
46
47 $this->type = $type;
48 $this->options = $options;
49 }
50
51 /**
52 * Returns the guessed field type
53 *
54 * @return string
55 */
56 public function getType()
57 {
58 return $this->type;
59 }
60
61 /**
62 * Returns the guessed options for creating instances of the guessed type
63 *
64 * @return array
65 */
66 public function getOptions()
67 {
68 return $this->options;
69 }
70}