Created
August 17, 2012 08:13
-
-
Save notomato/3376920 to your computer and use it in GitHub Desktop.
Example configuring multiple database connections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// config/bootstrap/connections.php | |
use lithium\data\Connections; | |
Connections::config(array( | |
'default' => array( | |
'type' => 'MongoDb', | |
'database' => 'my_mongo_db' | |
), | |
'legacy' => array( | |
'type' => 'database', | |
'adapter' => 'MySql', | |
'login' => 'bobbytables', | |
'password' => 's3kr1t', | |
'database' => 'my_mysql_db' | |
) | |
)); | |
// http://www.slideshare.net/nateabele/the-zen-of-lithium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment