for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the xAPI package.
*
* (c) Christian Flothmann <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\XApi\Bundle\LrsBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* The bundle configuration.
* @author Christian Flothmann <[email protected]>
class Configuration implements ConfigurationInterface
{
* {@inheritDoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('xabbuh_lrs');
$supportedDrivers = array('mongodb');
$rootNode
->children()
->scalarNode('driver')
->validate()
->ifNotInArray($supportedDrivers)
->thenInvalid('The driver %s is not supported. Please choose on of '.json_encode($supportedDrivers))
->end()
->isRequired()
->cannotBeEmpty()
;
return $treeBuilder;
}