vendor/gos/pubsub-router-bundle/DependencyInjection/Configuration.php line 19

Open in your IDE?
  1. <?php
  2. namespace Gos\Bundle\PubSubRouterBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  4. use Symfony\Component\Config\Definition\ConfigurationInterface;
  5. /**
  6.  * @author Johann Saunier <johann_27@hotmail.fr>
  7.  */
  8. class Configuration implements ConfigurationInterface
  9. {
  10.     /**
  11.      * {@inheritDoc}
  12.      */
  13.     public function getConfigTreeBuilder()
  14.     {
  15.         $treeBuilder = new TreeBuilder();
  16.         $rootNode $treeBuilder->root('gos_pubsub_router');
  17.         $rootNode
  18.             ->addDefaultsIfNotSet()
  19.             ->children()
  20.                 ->scalarNode('matcher_class')->defaultValue('Gos\Bundle\PubSubRouterBundle\Matcher\Matcher')->end()
  21.                 ->scalarNode('generator_class')->defaultValue('Gos\Bundle\PubSubRouterBundle\Generator\Generator')->end()
  22.                 ->scalarNode('route_loader_class')->defaultValue('Gos\Bundle\PubSubRouterBundle\Loader\RouteLoader')->end()
  23.                 ->scalarNode('router_class')->defaultValue('Gos\Bundle\PubSubRouterBundle\Router\Router')->end()
  24.                 ->arrayNode('routers')
  25.                     ->useAttributeAsKey('name')
  26.                     ->requiresAtLeastOneElement()
  27.                     ->prototype('array')
  28.                         ->children()
  29.                             ->arrayNode('context')
  30.                                 ->children()
  31.                                     ->scalarNode('tokenSeparator')->end()
  32.                                 ->end()
  33.                             ->end()
  34.                             ->arrayNode('resources')
  35.                                 ->prototype('scalar')->end()
  36.                             ->end()
  37.                         ->end()
  38.                     ->end()
  39.                 ->end()
  40.             ->end()
  41.         ->end();
  42.         return $treeBuilder;
  43.     }
  44. }