for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Superdesk Web Publisher Bridge for the Content API.
*
* Copyright 2015 Sourcefabric z.u. and contributors.
* For the full copyright and license information, please see the
* AUTHORS and LICENSE files distributed with this source code.
* @copyright 2015 Sourcefabric z.ú.
* @license http://www.superdesk.org/license
*/
namespace SWP\Bundle\BridgeBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
* This is the class that validates and merges configuration from your app/config files.
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('swp_bridge', 'array');
$rootNode
->children()
->arrayNode('api')
->scalarNode('host')
->info('Hostname of the Content API.')
->isRequired()
->cannotBeEmpty()
->end()
->integerNode('port')
->info('Port of the Content API.')
->defaultValue(80)
->enumNode('protocol')
->info('Protocol which will be used for connection to the Content Api.')
->values(array('http', 'https'))
->defaultValue('https')
->arrayNode('auth')
->scalarNode('client_id')
->info('Client ID for OAuth2 authentication for the Content Api.')
->scalarNode('username')
->info('Username for OAuth2 authentication for the Content Api.')
->scalarNode('password')
->info('Password for OAuth2 authentication for the Content Api.')
->variableNode('options')->end()
;
return $treeBuilder;
}