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

index 66b5f224ade3e6fe7bf9ba9d973edde55d1f4cef..f936cd1a3aa14f0f5c1e44e148064d7ab7a85831 100644 (file)
--- a/index.php
+++ b/index.php
@@ -29,16 +29,4 @@ $dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode
 
 $a = \Friendica\App::fromDice($dice);
 
-$a->processRequest();
-
-$a->runFrontend(
-       $dice->create(\Friendica\App\Router::class),
-       $dice->create(\Friendica\Core\PConfig\Capability\IManagePersonalConfigValues::class),
-       $dice->create(\Friendica\Security\Authentication::class),
-       $dice->create(\Friendica\App\Page::class),
-       $dice->create(\Friendica\Content\Nav::class),
-       $dice->create(Friendica\Module\Special\HTTPException::class),
-       new \Friendica\Util\HTTPInputData($request->getServerParams()),
-       $start_time,
-       $request->getServerParams()
-);
+$a->processRequest($request, $start_time);
index b151f78b39f31abd7111061e6cc8e43130489ff0..cfd6e52cf26cde4b93cd11de7176848271b87947 100644 (file)
@@ -34,6 +34,7 @@ use Friendica\Util\DateTimeFormat;
 use Friendica\Util\HTTPInputData;
 use Friendica\Util\HTTPSignature;
 use Friendica\Util\Profiler;
+use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerInterface;
 
 /**
@@ -154,7 +155,7 @@ class App
                $this->appHelper = $appHelper;
        }
 
-       public function processRequest(): void
+       public function processRequest(ServerRequestInterface $request, float $start_time): void
        {
                $this->load(
                        $this->container->create(DbaDefinition::class),
@@ -162,6 +163,18 @@ class App
                );
 
                $this->mode->setExecutor(Mode::INDEX);
+
+               $this->runFrontend(
+                       $this->container->create(\Friendica\App\Router::class),
+                       $this->container->create(\Friendica\Core\PConfig\Capability\IManagePersonalConfigValues::class),
+                       $this->container->create(\Friendica\Security\Authentication::class),
+                       $this->container->create(\Friendica\App\Page::class),
+                       $this->container->create(\Friendica\Content\Nav::class),
+                       $this->container->create(\Friendica\Module\Special\HTTPException::class),
+                       new \Friendica\Util\HTTPInputData($request->getServerParams()),
+                       $start_time,
+                       $request->getServerParams()
+               );
        }
 
        /**