| @@ 263-274 (lines=12) @@ | ||
| 260 | * @return \yii\db\Connection |
|
| 261 | * @throws \yii\base\InvalidConfigException |
|
| 262 | */ |
|
| 263 | private function db() |
|
| 264 | { |
|
| 265 | if ($this->db === null) { |
|
| 266 | $config = InstallerHelper::createDatabaseConfig($this->getDbConfigFromSession()); |
|
| 267 | $dbComponent = Yii::createObject( |
|
| 268 | $config |
|
| 269 | ); |
|
| 270 | $dbComponent->open(); |
|
| 271 | $this->db = $dbComponent; |
|
| 272 | } |
|
| 273 | return $this->db; |
|
| 274 | } |
|
| 275 | ||
| 276 | ||
| 277 | private function checkTime($ignoreTimeLimit=false) |
|
| @@ 208-219 (lines=12) @@ | ||
| 205 | * @return \yii\db\Connection |
|
| 206 | * @throws \yii\base\InvalidConfigException |
|
| 207 | */ |
|
| 208 | private function db() |
|
| 209 | { |
|
| 210 | if ($this->db === null) { |
|
| 211 | $config = InstallerHelper::createDatabaseConfig($this->getDbConfigFromSession()); |
|
| 212 | $dbComponent = Yii::createObject( |
|
| 213 | $config |
|
| 214 | ); |
|
| 215 | $dbComponent->open(); |
|
| 216 | $this->db = $dbComponent; |
|
| 217 | } |
|
| 218 | return $this->db; |
|
| 219 | } |
|
| 220 | ||
| 221 | private function getDbConfigFromSession() |
|
| 222 | { |
|