11 public function load()
13 $f = __DIR__ . '/../../data/bdrem.config.php';
14 if (file_exists($f)) {
15 return $this->loadFile($f);
18 throw new \Exception('No config file found');
21 protected function loadFile($filename)
24 $this->source = $source;
25 $this->daysBefore = $daysBefore;
26 $this->daysAfter = $daysAfter;
28 $this->locale = $locale;
32 public function loadSource()
34 if ($this->source === null) {
35 throw new \Exception('No source defined');
38 $settings = $this->source;
39 $class = '\\bdrem\\Source_' . array_shift($settings);
41 return new $class($settings[0]);