*/
namespace Friendica;
-require_once 'boot.php';
+require_once __DIR__ . '/../boot.php';
-use Friendica\Util\LoggerFactory;
+use Friendica\Network\HTTPException\InternalServerErrorException;
/**
* Basic object
*/
class BaseObject
{
+ /**
+ * @var App
+ */
private static $app = null;
/**
* Same as get_app from boot.php
*
* @return App
+ * @throws \Exception
*/
public static function getApp()
{
if (empty(self::$app)) {
- $logger = $logger = LoggerFactory::create('app');
- self::$app = new App(dirname(__DIR__), $logger);
+ throw new InternalServerErrorException('App isn\'t initialized.');
}
return self::$app;