+ /**
+ * Load possible configuration file paths into $this->cfgFiles.
+ *
+ * @return void
+ */
+ protected function loadConfigFilePaths()
+ {
+ $phar = false;
+ if (class_exists('\\Phar')) {
+ $pharFile = \Phar::running();
+ if ($pharFile != '') {
+ $phar = true;
+ }
+ }
+ if ($phar) {
+ //remove phar:// from the path
+ $this->cfgFiles[] = substr($pharFile, 7) . '.config.php';
+ } else {
+ $this->cfgFiles[] = __DIR__ . '/../../data/phancap.config.php';
+ }
+
+ //TODO: add ~/.config/phancap.php
+
+ $this->cfgFiles[] = '/etc/phancap.php';
+ }
+
+ /**
+ * Load values of a configuration file into this class
+ *
+ * @param string $filename Configuration file (.php)
+ *
+ * @return void
+ */