diff --git a/index.php b/index.php index ce6daa5edb..d98b6db73a 100644 --- a/index.php +++ b/index.php @@ -29,10 +29,7 @@ $dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode $a = \Friendica\App::fromDice($dice); -$a->load( - $dice->create(\Friendica\Database\Definition\DbaDefinition::class), - $dice->create(\Friendica\Database\Definition\ViewDefinition::class), -); +$a->processRequest(); \Friendica\DI::mode()->setExecutor(\Friendica\App\Mode::INDEX); diff --git a/src/App.php b/src/App.php index 479abe7c89..04520db2fe 100644 --- a/src/App.php +++ b/src/App.php @@ -154,6 +154,14 @@ class App $this->appHelper = $appHelper; } + public function processRequest(): void + { + $this->load( + $this->container->create(DbaDefinition::class), + $this->container->create(ViewDefinition::class), + ); + } + /** * Load the whole app instance */