require_once 'boot.php';
+use Friendica\Util\LoggerFactory;
+
/**
* Basic object
*
* Same as get_app from boot.php
*
* @return App
+ * @throws \Exception
*/
public static function getApp()
{
- if (self::$app) {
- return self::$app;
+ if (empty(self::$app)) {
+ $logger = $logger = LoggerFactory::create('app');
+ self::$app = new App(dirname(__DIR__), $logger);
}
- 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;
}