vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle/DependencyInjection/Configuration.php
changeset 39 03b14b0fe101
equal deleted inserted replaced
38:bbdc7f9aa25e 39:03b14b0fe101
       
     1 <?php
       
     2 
       
     3 namespace Symfony\Bundle\DoctrineMigrationsBundle\DependencyInjection;
       
     4 
       
     5 use Symfony\Component\Config\Definition\Builder\TreeBuilder;
       
     6 
       
     7 /**
       
     8  * DoctrineMigrationsExtension configuration structure.
       
     9  *
       
    10  * @author Lukas Kahwe Smith <smith@pooteeweet.org>
       
    11  */
       
    12 class Configuration
       
    13 {
       
    14     /**
       
    15      * Generates the configuration tree.
       
    16      *
       
    17      * @return \Symfony\Component\Config\Definition\ArrayNode The config tree
       
    18      */
       
    19     public function getConfigTree()
       
    20     {
       
    21         $treeBuilder = new TreeBuilder();
       
    22         $rootNode = $treeBuilder->root('doctrine_migrations', 'array');
       
    23 
       
    24         $rootNode
       
    25             ->children()
       
    26                 ->scalarNode('dir_name')->defaultValue('%kernel.root_dir%/DoctrineMigrations')->cannotBeEmpty()->end()
       
    27                 ->scalarNode('namespace')->defaultValue('Application\Migrations')->cannotBeEmpty()->end()
       
    28                 ->scalarNode('table_name')->defaultValue('migration_versions')->cannotBeEmpty()->end()
       
    29                 ->scalarNode('name')->defaultValue('Application Migrations')->end()
       
    30             ->end()
       
    31         ;
       
    32 
       
    33         return $treeBuilder->buildTree();
       
    34     }
       
    35 }