* Application.php, Registry.php: Return registry key of database for easier use of setDefaultDatabase()
/trunk/Application.php |
---|
176,18 → 176,15 |
* |
* @param string $key |
* @param Database $database |
* @return string Registry key |
* @see Application::setDefaultDatabase() |
*/ |
public function registerDatabase ($key, Database $database) |
{ |
Registry::set($key, $database); |
return $key; |
} |
/** |
* Sets the default database |
* @param string Registry key to refer to the {@link Database} |
* @param key Registry key to refer to the {@link Database} |
*/ |
public function setDefaultDatabase ($key) |
{ |
/trunk/Registry.php |
---|
18,12 → 18,10 |
* |
* @param string $key |
* @param mixed $value |
* @return mixed The stored value |
*/ |
public static function set($key, $value) |
{ |
self::$_data[$key] = $value; |
return self::get($key); |
} |
/** |