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 package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  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.                         ->arrayNode('disable')->prototype('scalar')->end()->end()
  44.                     ->end()
  45.                 ->end()
  46.                 ->arrayNode('view')
  47.                     ->addDefaultsIfNotSet()
  48.                     ->children()
  49.                         ->booleanNode('annotations')->defaultTrue()->end()
  50.                     ->end()
  51.                 ->end()
  52.                 ->arrayNode('cache')
  53.                     ->addDefaultsIfNotSet()
  54.                     ->children()
  55.                         ->booleanNode('annotations')->defaultTrue()->end()
  56.                     ->end()
  57.                 ->end()
  58.                 ->arrayNode('security')
  59.                     ->addDefaultsIfNotSet()
  60.                     ->children()
  61.                         ->booleanNode('annotations')->defaultTrue()->end()
  62.                         ->scalarNode('expression_language')->defaultValue('Sensio\Bundle\FrameworkExtraBundle\Security\ExpressionLanguage')->end()
  63.                     ->end()
  64.                 ->end()
  65.                 ->arrayNode('psr_message')
  66.                     ->addDefaultsIfNotSet()
  67.                     ->children()
  68.                         ->booleanNode('enabled')->defaultValue(interface_exists('Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface') && class_exists('Zend\Diactoros\ServerRequestFactory'))->end()
  69.                     ->end()
  70.                 ->end()
  71.                 ->arrayNode('templating')
  72.                     ->fixXmlConfig('controller_pattern')
  73.                     ->children()
  74.                         ->arrayNode('controller_patterns')
  75.                             ->prototype('scalar')
  76.                         ->end()
  77.                     ->end()
  78.                 ->end()
  79.             ->end()
  80.         ;
  81.         return $treeBuilder;
  82.     }
  83. }