Skip to content
Snippets Groups Projects
Select Git revision
  • cc5c45822f918d18baed8ee8cb16453d2c297e7d
  • main default protected
  • v0.2.1
  • v0.2.0
  • v0.1.2
  • v0.1.0
  • v0.1.1
7 results

Configuration.php

Blame
  • Christoph Reiter's avatar
    Reiter, Christoph authored
    This adds one config entry and injects the value into a service when the bundle gets loaded.
    
    See the README changes for how to set the config in the symfony app.
    
    Fixes #2
    cc5c4582
    History
    Configuration.php 562 B
    <?php
    
    declare(strict_types=1);
    
    namespace DBP\API\StarterBundle\DependencyInjection;
    
    use Symfony\Component\Config\Definition\Builder\TreeBuilder;
    use Symfony\Component\Config\Definition\ConfigurationInterface;
    
    class Configuration implements ConfigurationInterface
    {
        public function getConfigTreeBuilder()
        {
            $treeBuilder = new TreeBuilder('dbp_starter');
    
            $treeBuilder->getRootNode()
                ->children()
                ->scalarNode('secret_token')->end()
                ->end()
                ->end();
    
            return $treeBuilder;
        }
    }