set($conf->lang); static::$db = static::$db ?? new Database; static::$user = static::$user ?? new User; } /** Checks whether the specified extensions are loaded and throws an exception if any are not */ public static function checkExtensions(string ...$ext): void { $missing = []; foreach ($ext as $e) { if (!extension_loaded($e)) { $missing[] = $e; } } if ($missing) { $total = sizeof($missing); $first = $missing[0]; throw new Exception("extMissing", ['first' => $first, 'total' => $total]); } } }