/** * @param string $path * @return bool|string */ protected static function findParentPath($path) { $dir = __DIR__; $previousDir = '.'; while (!is_dir($dir . '/' . $path)) { $dir = dirname($dir); if ($previousDir === $dir) { return false; } $previousDir = $dir; } return $dir . '/' . $path; } protected static function loadConfig() { if (is_readable(__DIR__ . '/testConfig.php')) { self::$config = (include __DIR__ . '/testConfig.php'); } else { self::$config = (include __DIR__ . '/testConfig.php.dist'); } if (!is_array(self::$config)) { throw new RuntimeException("Expecting array as configuration " . gettype(self::$config) . " given."); } } } Bootstrap::init();
/** * @return array */ public function getConfig() { return Bootstrap::getConfig(); }