X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseObject.php;h=33ed67754674b34731bef4eab345df47be755468;hb=d8d5031935d931d1919966622dc278ff91478c50;hp=01957164c10bd664fbd536b2f6c0680b5af8e9c9;hpb=a21f6135fcd8f0bfdb49de38a5ab4954d1784503;p=friendica.git diff --git a/src/BaseObject.php b/src/BaseObject.php index 01957164c1..33ed677546 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -4,8 +4,6 @@ */ namespace Friendica; -require_once 'boot.php'; - /** * Basic object * @@ -20,27 +18,25 @@ class BaseObject * * 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; } /** * Set the app * - * @param object $app App + * @param App $app App * * @return void */ - public static function setApp($app) + public static function setApp(App $app) { self::$app = $app; }