KnpGaufretteBundle/DependencyInjection/FactoryConfiguration.php

39 lines
964 B
PHP
Raw Permalink Normal View History

2011-05-08 21:04:37 +00:00
<?php
namespace Knp\Bundle\GaufretteBundle\DependencyInjection;
2011-05-08 21:04:37 +00:00
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* Factory configuration for the Gaufrette DIC extension
*
* @author Antoine Hérault <antoine.herault@gmail.com>
*/
class FactoryConfiguration implements ConfigurationInterface
{
/**
* Generates the configuration tree builder
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$treeBuilder
->root('knp_gaufrette')
2011-05-08 21:04:37 +00:00
->ignoreExtraKeys()
->fixXmlConfig('factory', 'factories')
->children()
->arrayNode('factories')
->prototype('scalar')->end()
->end()
->end()
->end()
;
return $treeBuilder;
}
}