Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 64 lines (56 sloc) 1.662 kb
86829c2 @webmozart [Form] Refactored FieldFactory and moved new implementation into the …
webmozart authored
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
fc5c541 @webmozart [Form] Reorganized code into "form extensions"
webmozart authored
6 * (c) Fabien Potencier <fabien@symfony.com>
86829c2 @webmozart [Form] Refactored FieldFactory and moved new implementation into the …
webmozart authored
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
fc5c541 @webmozart [Form] Reorganized code into "form extensions"
webmozart authored
12 namespace Symfony\Component\Form;
86829c2 @webmozart [Form] Refactored FieldFactory and moved new implementation into the …
webmozart authored
13
35d9e23 @vicb [Form] phpDoc
vicb authored
14 /**
15 * Interface for extensions which provide types, type extensions and a guesser.
16 */
fc5c541 @webmozart [Form] Reorganized code into "form extensions"
webmozart authored
17 interface FormExtensionInterface
86829c2 @webmozart [Form] Refactored FieldFactory and moved new implementation into the …
webmozart authored
18 {
35d9e23 @vicb [Form] phpDoc
vicb authored
19 /**
20 * Returns a type by name.
21 *
22 * @param string $name The name of the type
23 *
24 * @return FormTypeInterface The type
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
25 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
26 * @throws Exception\InvalidArgumentException if the given type is not supported by this extension
35d9e23 @vicb [Form] phpDoc
vicb authored
27 */
57d3b50 @fabpot fixed CS
fabpot authored
28 public function getType($name);
86829c2 @webmozart [Form] Refactored FieldFactory and moved new implementation into the …
webmozart authored
29
35d9e23 @vicb [Form] phpDoc
vicb authored
30 /**
31 * Returns whether the given type is supported.
32 *
33 * @param string $name The name of the type
34 *
3645771 @stloyd [2.3][Form] Cleanup & fix phpdocs
stloyd authored
35 * @return bool Whether the type is supported by this extension
35d9e23 @vicb [Form] phpDoc
vicb authored
36 */
57d3b50 @fabpot fixed CS
fabpot authored
37 public function hasType($name);
fc5c541 @webmozart [Form] Reorganized code into "form extensions"
webmozart authored
38
35d9e23 @vicb [Form] phpDoc
vicb authored
39 /**
40 * Returns the extensions for the given type.
41 *
42 * @param string $name The name of the type
43 *
9b7094a @raziel057 CS Fixes - Replaced "array of type" by "Type[]" in PHPDoc block
raziel057 authored
44 * @return FormTypeExtensionInterface[] An array of extensions as FormTypeExtensionInterface instances
35d9e23 @vicb [Form] phpDoc
vicb authored
45 */
57d3b50 @fabpot fixed CS
fabpot authored
46 public function getTypeExtensions($name);
3e5fc07 @webmozart [Form] Added FormTypeExtensionInterface
webmozart authored
47
35d9e23 @vicb [Form] phpDoc
vicb authored
48 /**
49 * Returns whether this extension provides type extensions for the given type.
50 *
51 * @param string $name The name of the type
52 *
3645771 @stloyd [2.3][Form] Cleanup & fix phpdocs
stloyd authored
53 * @return bool Whether the given type has extensions
35d9e23 @vicb [Form] phpDoc
vicb authored
54 */
57d3b50 @fabpot fixed CS
fabpot authored
55 public function hasTypeExtensions($name);
3e5fc07 @webmozart [Form] Added FormTypeExtensionInterface
webmozart authored
56
35d9e23 @vicb [Form] phpDoc
vicb authored
57 /**
58 * Returns the type guesser provided by this extension.
59 *
60 * @return FormTypeGuesserInterface|null The type guesser
61 */
57d3b50 @fabpot fixed CS
fabpot authored
62 public function getTypeGuesser();
fc5c541 @webmozart [Form] Reorganized code into "form extensions"
webmozart authored
63 }
Something went wrong with that request. Please try again.