| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function init() |
||
| 22 | { |
||
| 23 | parent::init(); |
||
| 24 | if ($dbPath = realpath(__DIR__ . '/../exchange.db')) { |
||
| 25 | $config = [ |
||
| 26 | 'class' => 'yii\db\Connection', |
||
| 27 | 'dsn' => 'sqlite:' . $dbPath, |
||
| 28 | 'username' => '', |
||
| 29 | 'password' => '', |
||
| 30 | 'charset' => 'utf8', |
||
| 31 | ]; |
||
| 32 | \Yii::$app->set('exchangeDb', $config); |
||
| 33 | } |
||
| 63 | } |