/** * Static method to return the database connection associated with a given DbObject * * @param string $className Name of the DbObject to retreive the default connection of * @return DbConnection object */ private static function _getConnection($className) { return DbModule::getConnection(call_user_func(array($className, '_getConnectionName'), $className)); }
function db($connectionName) { return DbModule::getConnection($connectionName); }
public function __construct($params) { $this->db = DbModule::getConnection($params['db_connection']); $this->style = $params['style']; $this->lifetime = $params['lifetime']; }