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