* Application.php, Registry.php: Return registry key of database for easier use of setDefaultDatabase()
/trunk/Application.php |
---|
176,15 → 176,18 |
* |
* @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 key Registry key to refer to the {@link Database} |
* @param string Registry key to refer to the {@link Database} |
*/ |
public function setDefaultDatabase($key) |
{ |
/trunk/Registry.php |
---|
18,10 → 18,12 |
* |
* @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); |
} |
/** |