]> git.mxchange.org Git - friendica.git/commitdiff
Inline App::load() call in new processRequest() method
authorArt4 <art4@wlabs.de>
Fri, 20 Dec 2024 10:04:02 +0000 (10:04 +0000)
committerArt4 <art4@wlabs.de>
Fri, 20 Dec 2024 10:04:02 +0000 (10:04 +0000)
index.php
src/App.php

index ce6daa5edba46d6662e38121973eac9ac568ef8c..d98b6db73a436d2837f6ff6a1cd40ccccee9997b 100644 (file)
--- 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);
 
index 479abe7c89d53be2a4b33645ec933c2a9258d2ea..04520db2feb229a12da143cbf0a2de01f8bda8de 100644 (file)
@@ -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
         */