vendor/knplabs/knp-gaufrette-bundle/DependencyInjection/FactoryConfiguration.php line 25

Open in your IDE?
  1. <?php
  2. namespace Knp\Bundle\GaufretteBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  4. use Symfony\Component\Config\Definition\ConfigurationInterface;
  5. /**
  6.  * Factory configuration for the Gaufrette DIC extension
  7.  *
  8.  * @author Antoine Hérault <antoine.herault@gmail.com>
  9.  */
  10. class FactoryConfiguration implements ConfigurationInterface
  11. {
  12.     /**
  13.      * Generates the configuration tree builder
  14.      *
  15.      * @return TreeBuilder
  16.      */
  17.     public function getConfigTreeBuilder()
  18.     {
  19.         $treeBuilder = new TreeBuilder();
  20.         $treeBuilder
  21.             ->root('knp_gaufrette')
  22.                 ->ignoreExtraKeys()
  23.                 ->fixXmlConfig('factory''factories')
  24.                 ->children()
  25.                     ->arrayNode('factories')
  26.                         ->prototype('scalar')->end()
  27.                     ->end()
  28.                 ->end()
  29.             ->end()
  30.         ;
  31.         return $treeBuilder;
  32.     }
  33. }