X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=7a6e26b42e02f6fdce75c77d3fbc0e23c79cf322;hb=7fb913eb86e9897de3551811ba4adc9d7caf8c14;hp=3e560970892ffdcc0152b865157777fd1a6add9b;hpb=9d45118356b0a72172661ae373845e403b4ed9dc;p=friendica.git diff --git a/index.php b/index.php index 3e56097089..7a6e26b42e 100644 --- a/index.php +++ b/index.php @@ -4,17 +4,25 @@ * Friendica */ +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'; -$dice = new \Dice\Dice(); -$dice = $dice->addRules(include __DIR__ . '/static/dependencies.config.php'); +$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\BaseObject::setDependencyInjection($dice); +\Friendica\DI::init($dice); -$a = \Friendica\BaseObject::getApp(); +$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) +);