php Programming Glossary: connectionmanager
How to use multiple databases dynamically for one model in CakePHP http://stackoverflow.com/questions/13223946/how-to-use-multiple-databases-dynamically-for-one-model-in-cakephp . So I'm currently writing an extension on the Model and ConnectionManager classes to bypass CakePHP's basic database behaviors. So the.. datasource 'default' nds datasource . '_' . database db ConnectionManager getDataSource datasource db setConfig array 'name' nds 'database'.. 'name' nds 'database' database 'persistent' false if ds ConnectionManager create nds db config this useDbConfig nds this cacheQueries..
CakePHP switch database (using same datasource) on the fly? http://stackoverflow.com/questions/5512327/cakephp-switch-database-using-same-datasource-on-the-fly public function dbConnect config array ClassRegistry init 'ConnectionManager' debug config 'datasource' dbInstance ConnectionManager getInstance.. 'ConnectionManager' debug config 'datasource' dbInstance ConnectionManager getInstance dbInstance config config 'datasource' 'database'.. config config 'datasource' 'database' config 'database' db ConnectionManager getDataSource config 'datasource' db disconnect db cacheSources..
|