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