Skip to content

Commit

Permalink
[DoctrineBundle] added a doctrine.dbal.connections parameter that kee…
Browse files Browse the repository at this point in the history
…ps the list of registered DBAL connections
  • Loading branch information
fabpot committed Apr 29, 2011
1 parent 43e38c3 commit a607afb
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -71,6 +71,12 @@ protected function dbalLoad(array $config, ContainerBuilder $container)

$container->getDefinition('doctrine.dbal.connection_factory')->replaceArgument(0, $config['types']);

$connections = array();
foreach (array_keys($config['connections']) as $name) {
$connections[$name] = sprintf('doctrine.dbal.%s_connection', $name);
}
$container->setParameter('doctrine.dbal.connections', $connections);

foreach ($config['connections'] as $name => $connection) {
$this->loadDbalConnection($name, $connection, $container);
}
Expand Down

0 comments on commit a607afb

Please sign in to comment.