Fix indentation

This commit is contained in:
Art4 2024-12-26 18:36:40 +00:00
parent ed06480e75
commit 962a76759f

View file

@ -30,266 +30,266 @@ use Dice\Dice;
*/ */
return (function(string $basepath, array $getVars, array $serverVars, array $cookieVars): array { return (function(string $basepath, array $getVars, array $serverVars, array $cookieVars): array {
return [ return [
'*' => [ '*' => [
// marks all class result as shared for other creations, so there's just // marks all class result as shared for other creations, so there's just
// one instance for the whole execution // one instance for the whole execution
'shared' => true, 'shared' => true,
],
\Friendica\Core\Addon\Capability\ICanLoadAddons::class => [
'instanceOf' => \Friendica\Core\Addon\Model\AddonLoader::class,
'constructParams' => [
$basepath,
[Dice::INSTANCE => Dice::SELF],
], ],
], \Friendica\Core\Addon\Capability\ICanLoadAddons::class => [
\Friendica\Util\BasePath::class => [ 'instanceOf' => \Friendica\Core\Addon\Model\AddonLoader::class,
'constructParams' => [ 'constructParams' => [
$basepath, $basepath,
$serverVars, [Dice::INSTANCE => Dice::SELF],
] ],
],
\Friendica\Core\Hooks\Model\DiceInstanceManager::class => [
'constructParams' => [
[Dice::INSTANCE => Dice::SELF],
]
],
\Friendica\Core\Hooks\Util\StrategiesFileManager::class => [
'constructParams' => [
$basepath,
], ],
'call' => [ \Friendica\Util\BasePath::class => [
['loadConfig'], 'constructParams' => [
],
],
\Friendica\Core\Hooks\Capability\ICanRegisterStrategies::class => [
'instanceOf' => \Friendica\Core\Hooks\Model\DiceInstanceManager::class,
'constructParams' => [
[Dice::INSTANCE => Dice::SELF],
],
],
\Friendica\AppHelper::class => [
'instanceOf' => \Friendica\AppLegacy::class,
],
\Friendica\Core\Hooks\Capability\ICanCreateInstances::class => [
'instanceOf' => \Friendica\Core\Hooks\Model\DiceInstanceManager::class,
'constructParams' => [
[Dice::INSTANCE => Dice::SELF],
],
],
\Friendica\Core\Config\Util\ConfigFileManager::class => [
'instanceOf' => \Friendica\Core\Config\Factory\Config::class,
'call' => [
['createConfigFileManager', [
$basepath, $basepath,
$serverVars, $serverVars,
], Dice::CHAIN_CALL], ]
], ],
], \Friendica\Core\Hooks\Model\DiceInstanceManager::class => [
\Friendica\Core\Config\ValueObject\Cache::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\Config\Factory\Config::class, [Dice::INSTANCE => Dice::SELF],
'call' => [ ]
['createCache', [], Dice::CHAIN_CALL],
], ],
], \Friendica\Core\Hooks\Util\StrategiesFileManager::class => [
\Friendica\App\Mode::class => [ 'constructParams' => [
'call' => [
['determineRunMode', [true, $serverVars], Dice::CHAIN_CALL],
['determine', [
$basepath, $basepath,
], Dice::CHAIN_CALL], ],
'call' => [
['loadConfig'],
],
], ],
], \Friendica\Core\Hooks\Capability\ICanRegisterStrategies::class => [
\Friendica\Core\Config\Capability\IManageConfigValues::class => [ 'instanceOf' => \Friendica\Core\Hooks\Model\DiceInstanceManager::class,
'instanceOf' => \Friendica\Core\Config\Model\DatabaseConfig::class, 'constructParams' => [
'constructParams' => [ [Dice::INSTANCE => Dice::SELF],
$serverVars, ],
], ],
], \Friendica\AppHelper::class => [
\Friendica\Core\PConfig\Capability\IManagePersonalConfigValues::class => [ 'instanceOf' => \Friendica\AppLegacy::class,
'instanceOf' => \Friendica\Core\PConfig\Factory\PConfig::class,
'call' => [
['create', [], Dice::CHAIN_CALL],
]
],
\Friendica\Database\Definition\DbaDefinition::class => [
'constructParams' => [
$basepath,
], ],
'call' => [ \Friendica\Core\Hooks\Capability\ICanCreateInstances::class => [
['load', [false], Dice::CHAIN_CALL], 'instanceOf' => \Friendica\Core\Hooks\Model\DiceInstanceManager::class,
'constructParams' => [
[Dice::INSTANCE => Dice::SELF],
],
], ],
], \Friendica\Core\Config\Util\ConfigFileManager::class => [
\Friendica\Database\Definition\ViewDefinition::class => [ 'instanceOf' => \Friendica\Core\Config\Factory\Config::class,
'constructParams' => [ 'call' => [
$basepath, ['createConfigFileManager', [
$basepath,
$serverVars,
], Dice::CHAIN_CALL],
],
], ],
'call' => [ \Friendica\Core\Config\ValueObject\Cache::class => [
['load', [false], Dice::CHAIN_CALL], 'instanceOf' => \Friendica\Core\Config\Factory\Config::class,
'call' => [
['createCache', [], Dice::CHAIN_CALL],
],
], ],
], \Friendica\App\Mode::class => [
\Friendica\Database\Database::class => [ 'call' => [
'constructParams' => [ ['determineRunMode', [true, $serverVars], Dice::CHAIN_CALL],
[Dice::INSTANCE => \Friendica\Core\Config\Model\ReadOnlyFileConfig::class], ['determine', [
$basepath,
], Dice::CHAIN_CALL],
],
], ],
], \Friendica\Core\Config\Capability\IManageConfigValues::class => [
\Friendica\App\BaseURL::class => [ 'instanceOf' => \Friendica\Core\Config\Model\DatabaseConfig::class,
'constructParams' => [ 'constructParams' => [
$serverVars, $serverVars,
],
], ],
], \Friendica\Core\PConfig\Capability\IManagePersonalConfigValues::class => [
'$hostname' => [ 'instanceOf' => \Friendica\Core\PConfig\Factory\PConfig::class,
'instanceOf' => \Friendica\App\BaseURL::class, 'call' => [
'constructParams' => [ ['create', [], Dice::CHAIN_CALL],
$serverVars, ]
], ],
'call' => [ \Friendica\Database\Definition\DbaDefinition::class => [
['getHost', [], Dice::CHAIN_CALL], 'constructParams' => [
$basepath,
],
'call' => [
['load', [false], Dice::CHAIN_CALL],
],
], ],
], \Friendica\Database\Definition\ViewDefinition::class => [
\Friendica\Core\Cache\Type\AbstractCache::class => [ 'constructParams' => [
'constructParams' => [ $basepath,
[Dice::INSTANCE => '$hostname'], ],
'call' => [
['load', [false], Dice::CHAIN_CALL],
],
], ],
], \Friendica\Database\Database::class => [
\Friendica\App\Page::class => [ 'constructParams' => [
'constructParams' => [ [Dice::INSTANCE => \Friendica\Core\Config\Model\ReadOnlyFileConfig::class],
$basepath, ],
], ],
], \Friendica\App\BaseURL::class => [
\Psr\Log\LoggerInterface::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\Logger\Factory\Logger::class, $serverVars,
'call' => [ ],
['create', [], Dice::CHAIN_CALL],
], ],
], '$hostname' => [
\Friendica\Core\Logger\Type\SyslogLogger::class => [ 'instanceOf' => \Friendica\App\BaseURL::class,
'instanceOf' => \Friendica\Core\Logger\Factory\SyslogLogger::class, 'constructParams' => [
'call' => [ $serverVars,
['create', [], Dice::CHAIN_CALL], ],
'call' => [
['getHost', [], Dice::CHAIN_CALL],
],
], ],
], \Friendica\Core\Cache\Type\AbstractCache::class => [
\Friendica\Core\Logger\Type\StreamLogger::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\Logger\Factory\StreamLogger::class, [Dice::INSTANCE => '$hostname'],
'call' => [ ],
['create', [], Dice::CHAIN_CALL],
], ],
], \Friendica\App\Page::class => [
\Friendica\Core\Logger\Capability\IHaveCallIntrospections::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\Logger\Util\Introspection::class, $basepath,
'constructParams' => [ ],
\Friendica\Core\Logger\Capability\IHaveCallIntrospections::IGNORE_CLASS_LIST,
], ],
], \Psr\Log\LoggerInterface::class => [
'$devLogger' => [ 'instanceOf' => \Friendica\Core\Logger\Factory\Logger::class,
'instanceOf' => \Friendica\Core\Logger\Factory\StreamLogger::class, 'call' => [
'call' => [ ['create', [], Dice::CHAIN_CALL],
['createDev', [], Dice::CHAIN_CALL], ],
], ],
], \Friendica\Core\Logger\Type\SyslogLogger::class => [
\Friendica\Core\Cache\Capability\ICanCache::class => [ 'instanceOf' => \Friendica\Core\Logger\Factory\SyslogLogger::class,
'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class, 'call' => [
'call' => [ ['create', [], Dice::CHAIN_CALL],
['createLocal', [], Dice::CHAIN_CALL], ],
], ],
], \Friendica\Core\Logger\Type\StreamLogger::class => [
\Friendica\Core\Cache\Capability\ICanCacheInMemory::class => [ 'instanceOf' => \Friendica\Core\Logger\Factory\StreamLogger::class,
'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class, 'call' => [
'call' => [ ['create', [], Dice::CHAIN_CALL],
['createLocal', [], Dice::CHAIN_CALL], ],
], ],
], \Friendica\Core\Logger\Capability\IHaveCallIntrospections::class => [
\Friendica\Core\Lock\Capability\ICanLock::class => [ 'instanceOf' => \Friendica\Core\Logger\Util\Introspection::class,
'instanceOf' => \Friendica\Core\Lock\Factory\Lock::class, 'constructParams' => [
'call' => [ \Friendica\Core\Logger\Capability\IHaveCallIntrospections::IGNORE_CLASS_LIST,
['create', [], Dice::CHAIN_CALL], ],
], ],
], '$devLogger' => [
\Friendica\App\Arguments::class => [ 'instanceOf' => \Friendica\Core\Logger\Factory\StreamLogger::class,
'instanceOf' => \Friendica\App\Arguments::class, 'call' => [
'call' => [ ['createDev', [], Dice::CHAIN_CALL],
['determine', [$serverVars, $getVars], Dice::CHAIN_CALL], ],
], ],
], \Friendica\Core\Cache\Capability\ICanCache::class => [
\Friendica\Core\System::class => [ 'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class,
'constructParams' => [ 'call' => [
$basepath, ['createLocal', [], Dice::CHAIN_CALL],
],
], ],
], \Friendica\Core\Cache\Capability\ICanCacheInMemory::class => [
\Friendica\App\Router::class => [ 'instanceOf' => \Friendica\Core\Cache\Factory\Cache::class,
'constructParams' => [ 'call' => [
$serverVars, ['createLocal', [], Dice::CHAIN_CALL],
__DIR__ . '/routes.config.php', ],
[Dice::INSTANCE => Dice::SELF],
null
], ],
], \Friendica\Core\Lock\Capability\ICanLock::class => [
\Friendica\Core\L10n::class => [ 'instanceOf' => \Friendica\Core\Lock\Factory\Lock::class,
'constructParams' => [ 'call' => [
$serverVars, $getVars ['create', [], Dice::CHAIN_CALL],
],
], ],
], \Friendica\App\Arguments::class => [
\Friendica\Core\Session\Capability\IHandleSessions::class => [ 'instanceOf' => \Friendica\App\Arguments::class,
'instanceOf' => \Friendica\Core\Session\Factory\Session::class, 'call' => [
'call' => [ ['determine', [$serverVars, $getVars], Dice::CHAIN_CALL],
['create', [$serverVars], Dice::CHAIN_CALL], ],
['start', [], Dice::CHAIN_CALL],
], ],
], \Friendica\Core\System::class => [
\Friendica\Core\Session\Capability\IHandleUserSessions::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\Session\Model\UserSession::class, $basepath,
], ],
\Friendica\Model\User\Cookie::class => [
'constructParams' => [
$cookieVars,
], ],
], \Friendica\App\Router::class => [
\Friendica\Core\Storage\Capability\ICanWriteToStorage::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\Storage\Repository\StorageManager::class, $serverVars,
'call' => [ __DIR__ . '/routes.config.php',
['getBackend', [], Dice::CHAIN_CALL], [Dice::INSTANCE => Dice::SELF],
null
],
], ],
], \Friendica\Core\L10n::class => [
\Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs::class => [ 'constructParams' => [
'instanceOf' => \Friendica\Core\KeyValueStorage\Factory\KeyValueStorage::class, $serverVars, $getVars
'call' => [ ],
['create', [], Dice::CHAIN_CALL],
], ],
], \Friendica\Core\Session\Capability\IHandleSessions::class => [
\Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests::class => [ 'instanceOf' => \Friendica\Core\Session\Factory\Session::class,
'instanceOf' => \Friendica\Network\HTTPClient\Factory\HttpClient::class, 'call' => [
'call' => [ ['create', [$serverVars], Dice::CHAIN_CALL],
['createClient', [], Dice::CHAIN_CALL], ['start', [], Dice::CHAIN_CALL],
],
], ],
], \Friendica\Core\Session\Capability\IHandleUserSessions::class => [
\Friendica\Model\Log\ParsedLogIterator::class => [ 'instanceOf' => \Friendica\Core\Session\Model\UserSession::class,
'constructParams' => [
[Dice::INSTANCE => \Friendica\Util\ReversedFileReader::class],
]
],
\Friendica\Core\Worker\Repository\Process::class => [
'constructParams' => [
$serverVars
], ],
], \Friendica\Model\User\Cookie::class => [
\Friendica\App\Request::class => [ 'constructParams' => [
'constructParams' => [ $cookieVars,
$serverVars ],
], ],
], \Friendica\Core\Storage\Capability\ICanWriteToStorage::class => [
\Psr\Clock\ClockInterface::class => [ 'instanceOf' => \Friendica\Core\Storage\Repository\StorageManager::class,
'instanceOf' => \Friendica\Util\Clock\SystemClock::class 'call' => [
], ['getBackend', [], Dice::CHAIN_CALL],
\Friendica\Module\Special\HTTPException::class => [ ],
'constructParams' => [
$serverVars
], ],
], \Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs::class => [
\Friendica\Module\Api\ApiResponse::class => [ 'instanceOf' => \Friendica\Core\KeyValueStorage\Factory\KeyValueStorage::class,
'constructParams' => [ 'call' => [
$serverVars, ['create', [], Dice::CHAIN_CALL],
$getVars['callback'] ?? '', ],
],
\Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests::class => [
'instanceOf' => \Friendica\Network\HTTPClient\Factory\HttpClient::class,
'call' => [
['createClient', [], Dice::CHAIN_CALL],
],
],
\Friendica\Model\Log\ParsedLogIterator::class => [
'constructParams' => [
[Dice::INSTANCE => \Friendica\Util\ReversedFileReader::class],
]
],
\Friendica\Core\Worker\Repository\Process::class => [
'constructParams' => [
$serverVars
],
],
\Friendica\App\Request::class => [
'constructParams' => [
$serverVars
],
],
\Psr\Clock\ClockInterface::class => [
'instanceOf' => \Friendica\Util\Clock\SystemClock::class
],
\Friendica\Module\Special\HTTPException::class => [
'constructParams' => [
$serverVars
],
],
\Friendica\Module\Api\ApiResponse::class => [
'constructParams' => [
$serverVars,
$getVars['callback'] ?? '',
],
], ],
],
]; ];
})( })(
dirname(__FILE__, 2), dirname(__FILE__, 2),