Conditions | 1 |
Paths | 1 |
Total Lines | 47 |
Code Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | public function getConfigTreeBuilder() |
||
25 | { |
||
26 | $treeBuilder = new TreeBuilder(); |
||
27 | $rootNode = $treeBuilder->root('anime_db_cache_time_keeper'); |
||
28 | |||
29 | /** |
||
30 | * Example config: |
||
31 | * |
||
32 | * anime_db_cache_time_keeper: |
||
33 | * use_driver: multi |
||
34 | * drivers: |
||
35 | * multi: |
||
36 | * fast: shmop |
||
37 | * slow: file |
||
38 | * shmop: |
||
39 | * salt: '%secret%' |
||
40 | * file: |
||
41 | * path: '%kernel.root_dir%/cache/cache-time-keeper/' |
||
42 | */ |
||
43 | $rootNode |
||
44 | ->children() |
||
45 | ->scalarNode('use_driver')->end() |
||
46 | ->arrayNode('drivers') |
||
47 | ->children() |
||
48 | ->arrayNode('multi') |
||
49 | ->children() |
||
50 | ->scalarNode('fast')->end() |
||
51 | ->scalarNode('slow')->end() |
||
52 | ->end() |
||
53 | ->end() // multi |
||
54 | ->arrayNode('shmop') |
||
55 | ->children() |
||
56 | ->scalarNode('salt')->end() |
||
57 | ->end() |
||
58 | ->end() // shmop |
||
59 | ->arrayNode('file') |
||
60 | ->children() |
||
61 | ->scalarNode('path')->end() |
||
62 | ->end() |
||
63 | ->end() // file |
||
64 | ->end() |
||
65 | ->end() // drivers |
||
66 | ->end() |
||
67 | ; |
||
68 | |||
69 | return $treeBuilder; |
||
70 | } |
||
71 | } |
||
72 |