+ $this->loadConfigFilePaths();
+ foreach ($this->cfgFiles as $file) {
+ if (file_exists($file)) {
+ $this->cfgFileExists = true;
+ return $this->loadFile($file);
+ }
+ }
+ $this->cfgFileExists = false;
+ }
+
+ protected function loadConfigFilePaths()
+ {
+ $pharFile = \Phar::running();
+ if ($pharFile == '') {
+ $this->cfgFiles[] = __DIR__ . '/../../data/bdrem.config.php';
+ } else {
+ //remove phar:// from the path
+ $this->cfgFiles[] = substr($pharFile, 7) . '.config.php';