Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | "callback" => function () { |
||
10 | $rem = new \Anax\RemServer\RemServer(); |
||
11 | $rem->injectSession($this->get("session")); |
||
|
|||
12 | |||
13 | // Load the configuration file |
||
14 | $cfg = $this->get("configuration"); |
||
15 | $config = $cfg->load("remserver/config.php"); |
||
16 | $configFile = $config["file"] ?? null; |
||
17 | |||
18 | $dataset = $config["config"]["dataset"] ?? null; |
||
19 | if (!$dataset) { |
||
20 | throw new Exception("Configuration file '$configFile' is missing an entry 'dataset'."); |
||
21 | } |
||
22 | |||
23 | $rem->setDefaultDataset($dataset); |
||
24 | return $rem; |
||
25 | } |
||
29 |