X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=static%2Fdependencies.config.php;h=3df54b79e61106c3485e0377d8dd90e4dd359ef7;hb=abe6ecf820b729c6943b272be255dc10abafde4e;hp=51fff622898a1dfda0f72c605fcc53e25a5cc4b4;hpb=d5a473abdaa019b6b3747ef6ee15c6202cec839b;p=friendica.git diff --git a/static/dependencies.config.php b/static/dependencies.config.php index 51fff62289..3df54b79e6 100644 --- a/static/dependencies.config.php +++ b/static/dependencies.config.php @@ -1,4 +1,37 @@ . + * + * The configuration defines "complex" dependencies inside Friendica + * So this classes shouldn't be simple or their dependencies are already defined here. + * + * This kind of dependencies are NOT required to be defined here: + * - $a = new ClassA(new ClassB()); + * - $a = new ClassA(); + * - $a = new ClassA(Configuration $configuration); + * + * This kind of dependencies SHOULD be defined here: + * - $a = new ClassA(); + * $b = $a->create(); + * + * - $a = new ClassA($creationPassedVariable); + * + */ use Dice\Dice; use Friendica\App; @@ -13,25 +46,10 @@ use Friendica\Database\Database; use Friendica\Factory; use Friendica\Model\Storage\IStorage; use Friendica\Model\User\Cookie; +use Friendica\Network; use Friendica\Util; use Psr\Log\LoggerInterface; -/** - * The configuration defines "complex" dependencies inside Friendica - * So this classes shouldn't be simple or their dependencies are already defined here. - * - * This kind of dependencies are NOT required to be defined here: - * - $a = new ClassA(new ClassB()); - * - $a = new ClassA(); - * - $a = new ClassA(Configuration $configuration); - * - * This kind of dependencies SHOULD be defined here: - * - $a = new ClassA(); - * $b = $a->create(); - * - * - $a = new ClassA($creationPassedVariable); - * - */ return [ '*' => [ // marks all class result as shared for other creations, so there's just @@ -173,10 +191,9 @@ return [ ], App\Router::class => [ 'constructParams' => [ - $_SERVER, null - ], - 'call' => [ - ['loadRoutes', [include __DIR__ . '/routes.config.php'], Dice::CHAIN_CALL], + $_SERVER, + __DIR__ . '/routes.config.php', + null ], ], L10n::class => [ @@ -202,4 +219,7 @@ return [ ['getBackend', [], Dice::CHAIN_CALL], ], ], + Network\IHTTPRequest::class => [ + 'instanceOf' => Network\HTTPRequest::class, + ] ];