mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
Create PSR-7 request
This commit is contained in:
parent
d6ec1d7d6b
commit
16bdd76be1
1 changed files with 5 additions and 3 deletions
|
@ -15,11 +15,13 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
|
||||||
|
|
||||||
require __DIR__ . '/vendor/autoload.php';
|
require __DIR__ . '/vendor/autoload.php';
|
||||||
|
|
||||||
|
$request = \GuzzleHttp\Psr7\ServerRequest::fromGlobals();
|
||||||
|
|
||||||
$dice = (new Dice())->addRules(include __DIR__ . '/static/dependencies.config.php');
|
$dice = (new Dice())->addRules(include __DIR__ . '/static/dependencies.config.php');
|
||||||
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
|
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
|
||||||
$addonLoader = $dice->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
|
$addonLoader = $dice->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
|
||||||
$dice = $dice->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
$dice = $dice->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||||
$dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode', [false, $_SERVER], Dice::CHAIN_CALL]]]);
|
$dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL]]]);
|
||||||
|
|
||||||
\Friendica\DI::init($dice);
|
\Friendica\DI::init($dice);
|
||||||
|
|
||||||
|
@ -36,7 +38,7 @@ $a->runFrontend(
|
||||||
$dice->create(\Friendica\App\Page::class),
|
$dice->create(\Friendica\App\Page::class),
|
||||||
$dice->create(\Friendica\Content\Nav::class),
|
$dice->create(\Friendica\Content\Nav::class),
|
||||||
$dice->create(Friendica\Module\Special\HTTPException::class),
|
$dice->create(Friendica\Module\Special\HTTPException::class),
|
||||||
new \Friendica\Util\HTTPInputData($_SERVER),
|
new \Friendica\Util\HTTPInputData($request->getServerParams()),
|
||||||
$start_time,
|
$start_time,
|
||||||
$_SERVER
|
$request->getServerParams()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue