Completed
Push — master ( 316dff...63e9a9 )
by Alex
11s
created

Configuration::getConfigTreeBuilder()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 25
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 17
nc 1
nop 0
1
<?php
2
3
namespace Debril\RssAtomBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files.
10
 *
11
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritDoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder();
21
22
        $treeBuilder->root('debril_rss_atom')
23
                ->children()
24
                    ->booleanNode('private')
25
                        ->info('Change cache headers so the RSS feed is not cached by public caches (like reverse-proxies...).')
26
                        ->defaultValue(false)
27
                    ->end()
28
                    ->booleanNode('force_refresh')
29
                    ->info('Do not send 304 status if the feed has not been modified since last hit')
30
                    ->defaultValue(false)
31
                    ->end()
32
                    ->arrayNode('date_formats')
33
                        ->prototype('scalar')->end()
34
                    ->end()
35
                ->end()
36
        ;
37
38
        // Here you should define the parameters that are allowed to
39
        // configure your bundle. See the documentation linked above for
40
        // more information on that topic.
41
        return $treeBuilder;
42
    }
43
}
44