]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/form/Symfony/Component/Form/FormExtensionInterface.php
a67055b797b1ced858aa9570354e9d217bb9f69d
[github/wallabag/wallabag.git] / vendor / symfony / form / Symfony / Component / Form / FormExtensionInterface.php
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 }