Use doctrine dbal connection name, rename doctrine_dbal_id into connection_name

This commit is contained in:
Falk Doering 2013-09-13 13:34:24 +02:00
parent 336e203655
commit 622e52c550

View File

@ -21,7 +21,7 @@ class DoctrineDbalAdapterFactory implements AdapterFactoryInterface
{ {
$definition = $container $definition = $container
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.doctrine_dbal')) ->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.doctrine_dbal'))
->addArgument(new Reference($config['doctrine_dbal_id'])) ->addArgument(new Reference('doctrine.dbal.' . $config['connection_name'] . '_connection'))
->addArgument($config['table']) ->addArgument($config['table'])
; ;
@ -45,7 +45,7 @@ class DoctrineDbalAdapterFactory implements AdapterFactoryInterface
{ {
$builder $builder
->children() ->children()
->scalarNode('doctrine_dbal_id')->isRequired()->cannotBeEmpty()->end() ->scalarNode('connection_name')->isRequired()->cannotBeEmpty()->end()
->scalarNode('table')->isRequired()->cannotBeEmpty()->end() ->scalarNode('table')->isRequired()->cannotBeEmpty()->end()
->arrayNode('columns') ->arrayNode('columns')
->children() ->children()