for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dontdrinkandroot\RestBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* @author Philip Washington Sorst <[email protected]>
*/
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ddr_rest');
// @formatter:off
$rootNode->children()
->arrayNode('paths')
->prototype('scalar')->end()
->end()
->arrayNode('metadata')
->children()
->arrayNode('directories')
->prototype('array')
->scalarNode('path')->isRequired()->end()
->scalarNode('namespace_prefix')->defaultValue('')->end()
->end();
// @formatter:on
return $treeBuilder;
}