| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | public function getConfigTreeBuilder() |
||
| 17 | { |
||
| 18 | $treeBuilder = new TreeBuilder(); |
||
| 19 | $rootNode = $treeBuilder->root('load_balancer'); |
||
| 20 | $rootNode |
||
| 21 | ->children() |
||
| 22 | ->scalarNode('host_chooser')->defaultValue('rotation')->end() |
||
| 23 | ->scalarNode('load_limit')->defaultValue('0.5')->end() |
||
| 24 | ->arrayNode('hosts') |
||
| 25 | ->useAttributeAsKey('id') |
||
| 26 | ->prototype('array') |
||
| 27 | ->children() |
||
| 28 | ->scalarNode('url')->end() |
||
| 29 | ->arrayNode('settings') |
||
| 30 | ->prototype('scalar')->end() |
||
| 31 | ->end() |
||
| 32 | ->end() |
||
| 33 | ->end() |
||
| 34 | ->end() |
||
| 35 | ->end(); |
||
| 36 | |||
| 37 | return $treeBuilder; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |