]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseObject.php
Worker-details: Using json_decode instead of reinventing hot water (#5441)
[friendica.git] / src / BaseObject.php
index 01957164c10bd664fbd536b2f6c0680b5af8e9c9..6b64daccf0d8dbbd3bc47d75cd7964db0fbc8e28 100644 (file)
@@ -20,16 +20,14 @@ 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;
        }
 
@@ -40,7 +38,7 @@ class BaseObject
         *
         * @return void
         */
-       public static function setApp($app)
+       public static function setApp(App $app)
        {
                self::$app = $app;
        }