| Conditions | 1 |
| Paths | 1 |
| Total Lines | 45 |
| Code Lines | 40 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 12 | ||
| Bugs | 2 | Features | 2 |
| 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('http_client') |
||
| 42 | ->info('service http used to make requests, see php-http, if null, tries autodiscovery plugin') |
||
| 43 | ->end() |
||
| 44 | ->scalarNode('key') |
||
| 45 | ->isRequired() |
||
| 46 | ->info('The service is not free. You must provide an API Key which can be found on : http://account.myposeo.com/account/configuration/api') |
||
| 47 | ->end() |
||
| 48 | ->arrayNode('type') |
||
| 49 | ->prototype('array') |
||
| 50 | ->children() |
||
| 51 | ->scalarNode('base_url') |
||
| 52 | ->isRequired() |
||
| 53 | ->defaultValue('http://api.myposeo.com/1.1/m/api/') |
||
| 54 | ->info('The API version you want to use') |
||
| 55 | ->end() |
||
| 56 | ->booleanNode('cache') |
||
| 57 | ->defaultTrue() |
||
| 58 | ->end() |
||
| 59 | ->scalarNode('cache_ttl')->end() |
||
| 60 | ->end() |
||
| 61 | ->end() |
||
| 62 | ->end() |
||
| 63 | ->end() |
||
| 64 | ->end() |
||
| 65 | ; |
||
| 66 | |||
| 67 | return $treeBuilder; |
||
| 68 | } |
||
| 69 | } |
||
| 70 |