Conditions | 1 |
Paths | 1 |
Total Lines | 42 |
Code Lines | 37 |
Lines | 0 |
Ratio | 0 % |
Changes | 10 | ||
Bugs | 2 | Features | 1 |
1 | <?php |
||
24 | public function getConfigTreeBuilder() |
||
25 | { |
||
26 | $treeBuilder = new TreeBuilder(); |
||
27 | $rootNode = $treeBuilder->root('my_poseo'); |
||
28 | |||
29 | $rootNode |
||
30 | ->children() |
||
31 | ->arrayNode('api') |
||
32 | ->children() |
||
33 | ->scalarNode('search_class') |
||
34 | ->defaultValue('Tristanbes\MyPoseoBundle\Api\Search') |
||
35 | ->info('Defines the class for the service, useful for tests to avoid real api calls') |
||
36 | ->end() |
||
37 | ->scalarNode('cache_service_id') |
||
38 | ->info('Defines the service id of the cache that will be used') |
||
39 | ->defaultValue(null) |
||
40 | ->end() |
||
41 | ->scalarNode('key') |
||
42 | ->isRequired() |
||
43 | ->info('The service is not free. You must provide an API Key which can be found on : http://account.myposeo.com/account/configuration/api') |
||
44 | ->end() |
||
45 | ->arrayNode('type') |
||
46 | ->prototype('array') |
||
47 | ->children() |
||
48 | ->scalarNode('base_url') |
||
49 | ->isRequired() |
||
50 | ->defaultValue('http://api.myposeo.com/1.1/m/api/') |
||
51 | ->info('The API version you want to use') |
||
52 | ->end() |
||
53 | ->booleanNode('cache') |
||
54 | ->defaultTrue() |
||
55 | ->end() |
||
56 | ->scalarNode('cache_ttl')->end() |
||
57 | ->end() |
||
58 | ->end() |
||
59 | ->end() |
||
60 | ->end() |
||
61 | ->end() |
||
62 | ; |
||
63 | |||
64 | return $treeBuilder; |
||
65 | } |
||
66 | } |
||
67 |