vendor/symfony/src/Symfony/Component/Form/FormExtensionInterface.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     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     function getType($name);
       
    27 
       
    28     /**
       
    29      * Returns whether the given type is supported.
       
    30      *
       
    31      * @param string $name The name of the type
       
    32      *
       
    33      * @return Boolean Whether the type is supported by this extension
       
    34      */
       
    35     function hasType($name);
       
    36 
       
    37     /**
       
    38      * Returns the extensions for the given type.
       
    39      *
       
    40      * @param string $name The name of the type
       
    41      *
       
    42      * @return array An array of extensions as FormTypeExtensionInterface instances
       
    43      */
       
    44     function getTypeExtensions($name);
       
    45 
       
    46     /**
       
    47      * Returns whether this extension provides type extensions for the given type.
       
    48      *
       
    49      * @param string $name The name of the type
       
    50      *
       
    51      * @return Boolean Whether the given type has extensions
       
    52      */
       
    53     function hasTypeExtensions($name);
       
    54 
       
    55     /**
       
    56      * Returns the type guesser provided by this extension.
       
    57      *
       
    58      * @return FormTypeGuesserInterface|null The type guesser
       
    59      */
       
    60     function getTypeGuesser();
       
    61 }