get_db($key); // Set the current key in the registry self::$instance[$key] = new Query_Builder($db_params); } // -------------------------------------------------------------------------- /** * Return exiting connections * * @return array */ public static function get_connections() { return array_keys(self::$instance); } // -------------------------------------------------------------------------- /** * Remove a database connection * * @param string $key * @return void */ public static function remove_db($key) { unset(self::$instance[$key]); } } // End of dbreg.php