mirror of
https://github.com/friendica/friendica
synced 2025-01-08 06:04:44 +00:00
Extract call of AddonLoader into App::setupContainerForAddons()
This commit is contained in:
parent
34b2419427
commit
f7c661b5e9
1 changed files with 11 additions and 6 deletions
17
src/App.php
17
src/App.php
|
@ -160,9 +160,8 @@ class App
|
|||
|
||||
public function processEjabberd(): void
|
||||
{
|
||||
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
|
||||
$addonLoader = $this->container->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
|
||||
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||
$this->setupContainerForAddons();
|
||||
|
||||
$this->container = $this->container->addRule(LoggerInterface::class,[
|
||||
'constructParams' => [LogChannel::AUTH_JABBERED],
|
||||
]);
|
||||
|
@ -184,10 +183,8 @@ class App
|
|||
|
||||
private function setupContainerForRunningFrontend(ServerRequestInterface $request): void
|
||||
{
|
||||
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
|
||||
$addonLoader = $this->container->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
|
||||
$this->setupContainerForAddons();
|
||||
|
||||
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||
$this->container = $this->container->addRule(Mode::class, [
|
||||
'call' => [
|
||||
['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL],
|
||||
|
@ -197,6 +194,14 @@ class App
|
|||
\Friendica\DI::init($this->container);
|
||||
}
|
||||
|
||||
private function setupContainerForAddons(): void
|
||||
{
|
||||
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
|
||||
$addonLoader = $this->container->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
|
||||
|
||||
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||
}
|
||||
|
||||
private function registerErrorHandler(): void
|
||||
{
|
||||
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));
|
||||
|
|
Loading…
Reference in a new issue