X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=1e6439e0383cb22d20d80c91af4bbbeef393b116;hb=43df34fe05b076513f8ddf98f8d97ce91d28964b;hp=16fc2e0d084482fb3ea0c66263516c0dde50a6ff;hpb=3e9f72cdada58c1f42a6f8ae3cc83feccdfec518;p=friendica.git diff --git a/index.php b/index.php index 16fc2e0d08..1e6439e038 100644 --- a/index.php +++ b/index.php @@ -4,14 +4,22 @@ * 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'; -// 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'); + +\Friendica\BaseObject::setDependencyInjection($dice); + +$a = \Friendica\BaseObject::getApp(); -$a->runFrontend(); +$a->runFrontend( + $dice->create(\Friendica\App\Module::class), + $dice->create(\Friendica\App\Router::class), + $dice->create(\Friendica\Core\Config\PConfiguration::class) +);