mvriel/ngem — Issue #1: As a user I want to have dynamic database connection via config so that I can setup my database connections
Author: Jerommeke4
Created: 2011-10-23 12:35:08+00:00
State: open

Users want to setup their database connections. We need to support some kind of multiple connections that are configured by the end user.

The database connection settings in Symfony2 are setup via the config.yml file. This file contains a Doctrine/Dbal config section that we will use for connecting to the different databases. In this file it is possible to configure multiple named database connections.

A possibile option would be to dynamically push config data into this file. This file should then be writable by the web server. By getting the 'Service' from the controller by doing the following the Database connection can be acquired.

$connection = $this->get('doctrine.dbal._connection);

Need to investigate some more on this issue