/
Configuration.php
53 lines (45 loc) · 1.58 KB
/
Configuration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* @author Christian Wygoda <christian.wygoda@wheregroup.com>
*/
namespace Mapbender\CoreBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface {
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder() {
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('mapbender_core');
$defaultScreenshotPath = 'app_screenshots';
$rootNode
->children()
->scalarNode('screenshot_path')
->defaultValue($defaultScreenshotPath)
->end()
->arrayNode('proxy')
->canBeUnset()
->addDefaultsIfNotSet()
->children()
->scalarNode('host')
->defaultNull()
->end()
->scalarNode('port')
->defaultNull()
->end()
->scalarNode('user')
->defaultNull()
->end()
->scalarNode('password')
->defaultNull()
->end()
->arrayNode('noproxy')
->prototype('scalar')
->end()
->end()
->end()
->end();
return $treeBuilder;
}
}