Initial commit
This commit is contained in:
38
DependencyInjection/FactoryConfiguration.php
Normal file
38
DependencyInjection/FactoryConfiguration.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection;
|
||||
|
||||
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('knplabs_gaufrette')
|
||||
->ignoreExtraKeys()
|
||||
->fixXmlConfig('factory', 'factories')
|
||||
->children()
|
||||
->arrayNode('factories')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user