Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | "callback" => function () { |
||
11 | $db = new \Anax\DatabaseQueryBuilder\DatabaseQueryBuilder(); |
||
12 | |||
13 | // Load the configuration files |
||
14 | $cfg = $this->get("configuration"); |
||
|
|||
15 | $config = $cfg->load("database"); |
||
16 | |||
17 | // Set the database configuration |
||
18 | $connection = $config["config"] ?? []; |
||
19 | $db->setOptions($connection); |
||
20 | $db->setDefaultsFromConfiguration(); |
||
21 | |||
22 | return $db; |
||
23 | } |
||
27 |