$value) { self::$config[$key] = $value; } Template::init(); DB::init(); new Router(); } /** * Find app config file in parent directories */ private static function findAppConfigFile(string $path): string { $currentDirectory = $path; while ($currentDirectory !== '/') { $configFile = $currentDirectory . '/config.php'; if (file_exists($configFile)) { return $configFile; } $currentDirectory = dirname($currentDirectory); } die('config.php missing'); } /** * Get config value */ public static function config($key): mixed { return self::$config[$key]; } }