|
|
@ -87,9 +87,6 @@ class Flight
|
|
|
|
/** Framework engine. */
|
|
|
|
/** Framework engine. */
|
|
|
|
private static Engine $engine;
|
|
|
|
private static Engine $engine;
|
|
|
|
|
|
|
|
|
|
|
|
/** Whether or not the app has been initialized. */
|
|
|
|
|
|
|
|
private static bool $initialized = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Don't allow object instantiation
|
|
|
|
* Don't allow object instantiation
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -127,14 +124,7 @@ class Flight
|
|
|
|
/** @return Engine Application instance */
|
|
|
|
/** @return Engine Application instance */
|
|
|
|
public static function app(): Engine
|
|
|
|
public static function app(): Engine
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!self::$initialized) {
|
|
|
|
return self::$engine ?? self::$engine = new Engine();
|
|
|
|
require_once __DIR__ . '/autoload.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self::setEngine(new Engine());
|
|
|
|
|
|
|
|
self::$initialized = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return self::$engine;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|