vendor/sensio/framework-extra-bundle/DependencyInjection/Configuration.php line 32

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony framework.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection;
  11. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  12. use Symfony\Component\Config\Definition\ConfigurationInterface;
  13. use Symfony\Component\Config\Definition\NodeInterface;
  14. /**
  15.  * FrameworkExtraBundle configuration structure.
  16.  *
  17.  * @author Henrik Bjornskov <hb@peytz.dk>
  18.  */
  19. class Configuration implements ConfigurationInterface
  20. {
  21.     /**
  22.      * Generates the configuration tree.
  23.      *
  24.      * @return NodeInterface
  25.      */
  26.     public function getConfigTreeBuilder()
  27.     {
  28.         $treeBuilder = new TreeBuilder();
  29.         $rootNode $treeBuilder->root('sensio_framework_extra''array');
  30.         $rootNode
  31.             ->children()
  32.                 ->arrayNode('router')
  33.                     ->addDefaultsIfNotSet()
  34.                     ->children()
  35.                         ->booleanNode('annotations')->defaultTrue()->end()
  36.                     ->end()
  37.                 ->end()
  38.                 ->arrayNode('request')
  39.                     ->addDefaultsIfNotSet()
  40.                     ->children()
  41.                         ->booleanNode('converters')->defaultTrue()->end()
  42.                         ->booleanNode('auto_convert')->defaultTrue()->end()
  43.                     ->end()
  44.                 ->end()
  45.                 ->arrayNode('view')
  46.                     ->addDefaultsIfNotSet()
  47.                     ->children()
  48.                         ->booleanNode('annotations')->defaultTrue()->end()
  49.                     ->end()
  50.                 ->end()
  51.                 ->arrayNode('cache')
  52.                     ->addDefaultsIfNotSet()
  53.                     ->children()
  54.                         ->booleanNode('annotations')->defaultTrue()->end()
  55.                     ->end()
  56.                 ->end()
  57.                 ->arrayNode('security')
  58.                     ->addDefaultsIfNotSet()
  59.                     ->children()
  60.                         ->booleanNode('annotations')->defaultTrue()->end()
  61.                         ->scalarNode('expression_language')->defaultValue('sensio_framework_extra.security.expression_language.default')->end()
  62.                     ->end()
  63.                 ->end()
  64.                 ->arrayNode('psr_message')
  65.                     ->addDefaultsIfNotSet()
  66.                     ->children()
  67.                         ->booleanNode('enabled')->defaultValue(interface_exists('Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface') && class_exists('Zend\Diactoros\ServerRequestFactory'))->end()
  68.                     ->end()
  69.                 ->end()
  70.                 ->arrayNode('templating')
  71.                     ->fixXmlConfig('controller_pattern')
  72.                     ->children()
  73.                         ->arrayNode('controller_patterns')
  74.                             ->prototype('scalar')
  75.                         ->end()
  76.                     ->end()
  77.                 ->end()
  78.             ->end()
  79.         ;
  80.         return $treeBuilder;
  81.     }
  82. }