mirror of
https://github.com/friendica/friendica
synced 2025-01-09 01:24:44 +00:00
extract setup of DI class
This commit is contained in:
parent
d2f2d1d0b9
commit
ce7fd1b0e2
1 changed files with 7 additions and 2 deletions
|
@ -166,7 +166,7 @@ class App
|
||||||
'constructParams' => [LogChannel::AUTH_JABBERED],
|
'constructParams' => [LogChannel::AUTH_JABBERED],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
\Friendica\DI::init($this->container);
|
$this->setupLegacyServerLocator();
|
||||||
|
|
||||||
$this->registerErrorHandler();
|
$this->registerErrorHandler();
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ class App
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
\Friendica\DI::init($this->container);
|
$this->setupLegacyServerLocator();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setupContainerForAddons(): void
|
private function setupContainerForAddons(): void
|
||||||
|
@ -203,6 +203,11 @@ class App
|
||||||
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function setupLegacyServerLocator(): void
|
||||||
|
{
|
||||||
|
\Friendica\DI::init($this->container);
|
||||||
|
}
|
||||||
|
|
||||||
private function registerErrorHandler(): void
|
private function registerErrorHandler(): void
|
||||||
{
|
{
|
||||||
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));
|
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));
|
||||||
|
|
Loading…
Reference in a new issue