Completed
Branch release/3.0 (fca904)
by Alex
03:04
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.3142
c 0
b 0
f 0
cc 1
eloc 13
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
                    ->arrayNode('date_formats')
29
                        ->prototype('scalar')->end()
30
                    ->end()
31
                ->end()
32
        ;
33
34
        // Here you should define the parameters that are allowed to
35
        // configure your bundle. See the documentation linked above for
36
        // more information on that topic.
37
        return $treeBuilder;
38
    }
39
}
40