| Conditions | 1 |
| Paths | 1 |
| Total Lines | 50 |
| Code Lines | 45 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 30 | { |
||
| 31 | $treeBuilder = new TreeBuilder(); |
||
| 32 | $rootNode = $treeBuilder->root('swp_bridge', 'array'); |
||
| 33 | |||
| 34 | $rootNode |
||
| 35 | ->children() |
||
| 36 | ->arrayNode('api') |
||
| 37 | ->children() |
||
| 38 | ->scalarNode('host') |
||
| 39 | ->info('Hostname of the Content API.') |
||
| 40 | ->isRequired() |
||
| 41 | ->cannotBeEmpty() |
||
| 42 | ->end() |
||
| 43 | ->integerNode('port') |
||
| 44 | ->info('Port of the Content API.') |
||
| 45 | ->defaultValue(80) |
||
| 46 | ->end() |
||
| 47 | ->enumNode('protocol') |
||
| 48 | ->info('Protocol which will be used for connection to the Content Api.') |
||
| 49 | ->values(array('http', 'https')) |
||
| 50 | ->defaultValue('https') |
||
| 51 | ->end() |
||
| 52 | ->end() |
||
| 53 | ->end() |
||
| 54 | ->arrayNode('auth') |
||
| 55 | ->children() |
||
| 56 | ->scalarNode('client_id') |
||
| 57 | ->info('Client ID for OAuth2 authentication for the Content Api.') |
||
| 58 | ->isRequired() |
||
| 59 | ->cannotBeEmpty() |
||
| 60 | ->end() |
||
| 61 | ->scalarNode('username') |
||
| 62 | ->info('Username for OAuth2 authentication for the Content Api.') |
||
| 63 | ->isRequired() |
||
| 64 | ->cannotBeEmpty() |
||
| 65 | ->end() |
||
| 66 | ->scalarNode('password') |
||
| 67 | ->info('Password for OAuth2 authentication for the Content Api.') |
||
| 68 | ->isRequired() |
||
| 69 | ->cannotBeEmpty() |
||
| 70 | ->end() |
||
| 71 | ->end() |
||
| 72 | ->end() |
||
| 73 | ->variableNode('options')->end() |
||
| 74 | ->end() |
||
| 75 | ; |
||
| 76 | |||
| 77 | return $treeBuilder; |
||
| 78 | } |
||
| 79 | } |
||
| 80 |