diff options
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/FormExtensionInterface.php')
-rw-r--r-- | vendor/symfony/form/Symfony/Component/Form/FormExtensionInterface.php | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/FormExtensionInterface.php b/vendor/symfony/form/Symfony/Component/Form/FormExtensionInterface.php new file mode 100644 index 00000000..a67055b7 --- /dev/null +++ b/vendor/symfony/form/Symfony/Component/Form/FormExtensionInterface.php | |||
@@ -0,0 +1,63 @@ | |||
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 | |||
12 | namespace Symfony\Component\Form; | ||
13 | |||
14 | /** | ||
15 | * Interface for extensions which provide types, type extensions and a guesser. | ||
16 | */ | ||
17 | interface FormExtensionInterface | ||
18 | { | ||
19 | /** | ||
20 | * Returns a type by name. | ||
21 | * | ||
22 | * @param string $name The name of the type | ||
23 | * | ||
24 | * @return FormTypeInterface The type | ||
25 | * | ||
26 | * @throws Exception\InvalidArgumentException if the given type is not supported by this extension | ||
27 | */ | ||
28 | public function getType($name); | ||
29 | |||
30 | /** | ||
31 | * Returns whether the given type is supported. | ||
32 | * | ||
33 | * @param string $name The name of the type | ||
34 | * | ||
35 | * @return Boolean Whether the type is supported by this extension | ||
36 | */ | ||
37 | public function hasType($name); | ||
38 | |||
39 | /** | ||
40 | * Returns the extensions for the given type. | ||
41 | * | ||
42 | * @param string $name The name of the type | ||
43 | * | ||
44 | * @return FormTypeExtensionInterface[] An array of extensions as FormTypeExtensionInterface instances | ||
45 | */ | ||
46 | public function getTypeExtensions($name); | ||
47 | |||
48 | /** | ||
49 | * Returns whether this extension provides type extensions for the given type. | ||
50 | * | ||
51 | * @param string $name The name of the type | ||
52 | * | ||
53 | * @return Boolean Whether the given type has extensions | ||
54 | */ | ||
55 | public function hasTypeExtensions($name); | ||
56 | |||
57 | /** | ||
58 | * Returns the type guesser provided by this extension. | ||
59 | * | ||
60 | * @return FormTypeGuesserInterface|null The type guesser | ||
61 | */ | ||
62 | public function getTypeGuesser(); | ||
63 | } | ||