DbReg class improvements

This commit is contained in:
Timothy Warren 2012-03-30 18:40:06 -04:00
parent 1ea1896378
commit e7abfec149

View File

@ -43,9 +43,10 @@ class DB_Reg {
/**
* Private constructor
*
* @param string $key
*/
protected function __construct($key)
private function __construct($key)
{
// Get the db connection parameters for the current database
$db_params = Settings::get_instance()->get_db($key);
@ -53,4 +54,17 @@ class DB_Reg {
// Set the current key in the registry
self::$instance[$key] = new Query_Builder($db_params);
}
// --------------------------------------------------------------------------
/**
* Return exiting connections
*
* @return array
*/
public function get_connections()
{
return array_keys(self::$instance);
}
}
// End of dbreg.php