Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Cache Manager resource
Example configuration:
resources.multidb.db1.adapter = "pdo_mysql" resources.multidb.db1.host = "localhost" resources.multidb.db1.username = "webuser" resources.multidb.db1.password = "XXXX" resources.multidb.db1.dbname = "db1" resources.multidb.db1.default = true resources.multidb.db2.adapter = "pdo_pgsql" resources.multidb.db2.host = "example.com" resources.multidb.db2.username = "dba" resources.multidb.db2.password = "notthatpublic" resources.multidb.db2.dbname = "db2"
array $_dbs = 'array'Associative array containing all configured db's
Detailsnull|Zend_Db_Adapter_Abstract $_defaultDb = ''An instance of the default db, if set
Details_setDefault(
$adapter
)
:
Set the default db adapter
DetailsgetDb(
null|string|Zend_Db_Adapter_Abstract $db
=
null
)
:
Zend_Db_Adapter_AbstractRetrieve the specified database connection
DetailsgetDefaultDb(
boolean $justPickOne
=
true
)
:
null|Zend_Db_Adapter_AbstractGet the default db connection
Detailsinit(
)
:
Zend_Application_Resource_MultidbInitialize the Database Connections (instances of Zend_Db_Table_Abstract)
DetailsisDefault(
string|Zend_Db_Adapter_Abstract $db
)
:
booleanDetermine if the given db(identifier) is the default db.
Details