X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=4857b1f12971a20a82c5ae62893bee154b5ebbb7;hb=79d5e3f6cbc196a0047aa31dc4bcdf298f783e69;hp=16fc2e0d084482fb3ea0c66263516c0dde50a6ff;hpb=3e9f72cdada58c1f42a6f8ae3cc83feccdfec518;p=friendica.git diff --git a/index.php b/index.php index 16fc2e0d08..4857b1f129 100644 --- a/index.php +++ b/index.php @@ -1,17 +1,43 @@ . + * */ +use Dice\Dice; + if (!file_exists(__DIR__ . '/vendor/autoload.php')) { die('Vendor path not found. Please execute "bin/composer.phar --no-dev install" on the command line in the web root.'); } require __DIR__ . '/vendor/autoload.php'; -// We assume that the index.php is called by a frontend process -// The value is set to "true" by default in App -$a = new Friendica\App(__DIR__, false); +$dice = (new Dice())->addRules(include __DIR__ . '/static/dependencies.config.php'); +$dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode', [false, $_SERVER], Dice::CHAIN_CALL]]]); + +\Friendica\DI::init($dice); + +$a = \Friendica\DI::app(); -$a->runFrontend(); +$a->runFrontend( + $dice->create(\Friendica\App\Module::class), + $dice->create(\Friendica\App\Router::class), + $dice->create(\Friendica\Core\PConfig\IPConfig::class), + $dice->create(\Friendica\App\Authentication::class), + $dice->create(\Friendica\App\Page::class) +);