mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 11:54:31 +02:00
Using method-chaining for DICE
This commit is contained in:
parent
a66580444f
commit
9682cc440c
9 changed files with 27 additions and 25 deletions
|
@ -4,14 +4,15 @@
|
|||
* 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');
|
||||
|
||||
\Friendica\BaseObject::setDependencyInjection($dice);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue