mirror of
https://github.com/friendica/friendica
synced 2025-04-26 16:30:12 +00:00
Removed implicit ::getApp() instance and added docblock
This commit is contained in:
parent
0d096cf32e
commit
800dbc7f44
3 changed files with 18 additions and 24 deletions
|
@ -6,9 +6,7 @@ namespace Friendica;
|
|||
|
||||
require_once 'boot.php';
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Factory;
|
||||
use Friendica\Util\BasePath;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
|
||||
/**
|
||||
* Basic object
|
||||
|
@ -30,11 +28,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\' initialized.');
|
||||
}
|
||||
|
||||
return self::$app;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue