*
* Same as get_app from boot.php
*
- * @return object
+ * @return App
*/
public static function getApp()
{
- if (self::$app) {
- return self::$app;
+ if (empty(self::$app)) {
+ self::$app = new App(dirname(__DIR__));
}
- self::$app = get_app();
-
return self::$app;
}
*
* @return void
*/
- public static function setApp($app)
+ public static function setApp(App $app)
{
self::$app = $app;
}