X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseObject.php;h=9a2d064750b7d74ca13bc17fd2473323cf3298f8;hb=0046e62077ff71559624f48667d844b12efcf65b;hp=4deba1ced15eba7df9c3c53f63318970502fa079;hpb=1e0e1674f2aeef54c52790946cfd61a199cb2042;p=friendica.git diff --git a/src/BaseObject.php b/src/BaseObject.php index 4deba1ced1..9a2d064750 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -4,11 +4,9 @@ */ namespace Friendica; -require_once 'boot.php'; +require_once __DIR__ . '/../boot.php'; -use Friendica\Core\Config; -use Friendica\Factory; -use Friendica\Util\BasePath; +use Friendica\Network\HTTPException\InternalServerErrorException; /** * Basic object @@ -17,6 +15,9 @@ use Friendica\Util\BasePath; */ class BaseObject { + /** + * @var App + */ private static $app = null; /** @@ -30,11 +31,7 @@ class BaseObject public static function getApp() { if (empty(self::$app)) { - $basedir = BasePath::create(dirname(__DIR__)); - $configLoader = new Config\ConfigCacheLoader($basedir); - $config = Factory\ConfigFactory::createCache($configLoader); - $logger = Factory\LoggerFactory::create('app', $config); - self::$app = new App($config, $logger); + throw new InternalServerErrorException('App isn\'t initialized.'); } return self::$app;