Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function getConfigTreeBuilder() |
||
30 | { |
||
31 | $treeBuilder = new TreeBuilder(); |
||
32 | $rootNode = $treeBuilder->root($this->alias); |
||
33 | |||
34 | $supportedDrivers = ['mongodb', 'orm']; |
||
35 | |||
36 | $rootNode |
||
37 | ->children() |
||
38 | |||
39 | ->scalarNode('db_driver') |
||
40 | ->validate() |
||
41 | ->ifNotInArray($supportedDrivers) |
||
42 | ->thenInvalid('The database driver %s is not supported. Please choose one of ' . json_encode($supportedDrivers)) |
||
43 | ->end() |
||
44 | ->isRequired() |
||
45 | ->cannotBeOverwritten() |
||
46 | ->cannotBeEmpty() |
||
47 | ->end() |
||
48 | |||
49 | ->scalarNode('email_class')->isRequired()->cannotBeEmpty()->end() |
||
50 | |||
51 | ->end(); |
||
52 | |||
53 | return $treeBuilder; |
||
54 | } |
||
55 | } |
||
56 |