Rev 35 | Rev 51 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 35 | Rev 45 | ||
|---|---|---|---|
| Line 174... | Line 174... | ||
| 174 | /**
|
174 | /**
|
| 175 | * Registers a database
|
175 | * Registers a database
|
| 176 | *
|
176 | *
|
| 177 | * @param string $key
|
177 | * @param string $key
|
| 178 | * @param Database $database
|
178 | * @param Database $database
|
| - | 179 | * @return string Registry key
|
|
| - | 180 | * @see Application::setDefaultDatabase()
|
|
| 179 | */
|
181 | */
|
| 180 | public function registerDatabase($key, Database $database) |
182 | public function registerDatabase ($key, Database $database) |
| 181 | {
|
183 | {
|
| 182 | Registry::set($key, $database); |
184 | Registry::set($key, $database); |
| - | 185 | return $key; |
|
| 183 | }
|
186 | }
|
| 184 | 187 | ||
| 185 | /**
|
188 | /**
|
| 186 | * Sets the default database
|
189 | * Sets the default database
|
| 187 | * @param key Registry key to refer to the {@link Database}
|
190 | * @param string Registry key to refer to the {@link Database}
|
| 188 | */
|
191 | */
|
| 189 | public function setDefaultDatabase($key) |
192 | public function setDefaultDatabase ($key) |
| 190 | {
|
193 | {
|
| 191 | $this->_defaultDatabase = $key; |
194 | $this->_defaultDatabase = $key; |
| 192 | }
|
195 | }
|