From: Art4 Date: Fri, 20 Dec 2024 10:04:02 +0000 (+0000) Subject: Inline App::load() call in new processRequest() method X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7a7b8d3e2724c7083e2d63f38ab957c63780a3d1;p=friendica.git Inline App::load() call in new processRequest() method --- 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 */