vendor/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/FactoryConfiguration.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     1 <?php
       
     2 
       
     3 /*
       
     4  * This file is part of the Symfony framework.
       
     5  *
       
     6  * (c) Fabien Potencier <fabien@symfony.com>
       
     7  *
       
     8  * This source file is subject to the MIT license that is bundled
       
     9  * with this source code in the file LICENSE.
       
    10  */
       
    11 
       
    12 namespace Symfony\Bundle\SecurityBundle\DependencyInjection;
       
    13 
       
    14 use Symfony\Component\Config\Definition\Builder\TreeBuilder;
       
    15 use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
       
    16 use Symfony\Component\Config\Definition\ConfigurationInterface;
       
    17 
       
    18 /**
       
    19  * This class contains the configuration information for the following tags:
       
    20  *
       
    21  *   * security.config
       
    22  *   * security.acl
       
    23  *
       
    24  * This information is solely responsible for how the different configuration
       
    25  * sections are normalized, and merged.
       
    26  *
       
    27  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
       
    28  */
       
    29 class FactoryConfiguration implements ConfigurationInterface
       
    30 {
       
    31     /**
       
    32      * Generates the configuration tree builder.
       
    33      *
       
    34      * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
       
    35      */
       
    36     public function getConfigTreeBuilder()
       
    37     {
       
    38         $tb = new TreeBuilder();
       
    39 
       
    40         $tb
       
    41             ->root('security')
       
    42                 ->ignoreExtraKeys()
       
    43                 ->fixXmlConfig('factory', 'factories')
       
    44                 ->children()
       
    45                     ->arrayNode('factories')
       
    46                         ->prototype('scalar')->end()
       
    47                     ->end()
       
    48                 ->end()
       
    49             ->end()
       
    50         ;
       
    51 
       
    52         return $tb;
       
    53     }
       
    54 }