<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\App;
use Friendica\Core\Cache;
use Friendica\Core\Config;
+use Friendica\Core\Hooks\Capabilities\ICanManageInstances;
+use Friendica\Core\Hooks\Model\InstanceManager;
use Friendica\Core\PConfig;
use Friendica\Core\L10n;
use Friendica\Core\Lock;
use Friendica\Core\Session\Capability\IHandleSessions;
+use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Core\Storage\Repository\StorageManager;
use Friendica\Database\Database;
+use Friendica\Database\Definition\DbaDefinition;
+use Friendica\Database\Definition\ViewDefinition;
use Friendica\Factory;
use Friendica\Core\Storage\Capability\ICanWriteToStorage;
use Friendica\Model\User\Cookie;
$_SERVER
]
],
- Config\Util\ConfigFileLoader::class => [
+ ICanManageInstances::class => [
+ 'instanceOf' => InstanceManager::class,
+ 'constructParams' => [
+ [Dice::INSTANCE => Dice::SELF],
+ ],
+ ],
+ Config\Util\ConfigFileManager::class => [
'instanceOf' => Config\Factory\Config::class,
'call' => [
- ['createConfigFileLoader', [
+ ['createConfigFileManager', [
[Dice::INSTANCE => '$basepath'],
$_SERVER,
], Dice::CHAIN_CALL],
Config\ValueObject\Cache::class => [
'instanceOf' => Config\Factory\Config::class,
'call' => [
- ['createCache', [$_SERVER], Dice::CHAIN_CALL],
+ ['createCache', [], Dice::CHAIN_CALL],
],
],
App\Mode::class => [
'call' => [
['determineRunMode', [true, $_SERVER], Dice::CHAIN_CALL],
- ['determine', [], Dice::CHAIN_CALL],
+ ['determine', [
+ [Dice::INSTANCE => '$basepath']
+ ], Dice::CHAIN_CALL],
],
],
Config\Capability\IManageConfigValues::class => [
- 'instanceOf' => Config\Factory\Config::class,
- 'call' => [
- ['create', [], Dice::CHAIN_CALL],
+ 'instanceOf' => Config\Model\DatabaseConfig::class,
+ 'constructParams' => [
+ $_SERVER,
],
],
PConfig\Capability\IManagePersonalConfigValues::class => [
['create', [], Dice::CHAIN_CALL],
]
],
+ DbaDefinition::class => [
+ 'constructParams' => [
+ [Dice::INSTANCE => '$basepath'],
+ ],
+ 'call' => [
+ ['load', [false], Dice::CHAIN_CALL],
+ ],
+ ],
+ ViewDefinition::class => [
+ 'constructParams' => [
+ [Dice::INSTANCE => '$basepath'],
+ ],
+ 'call' => [
+ ['load', [false], Dice::CHAIN_CALL],
+ ],
+ ],
Database::class => [
'constructParams' => [
- [Dice::INSTANCE => \Psr\Log\NullLogger::class],
+ [Dice::INSTANCE => Config\Model\ReadOnlyFileConfig::class],
],
],
/**
['createDev', [], Dice::CHAIN_CALL],
]
],
+ \Friendica\Core\Logger\Capabilities\IHaveCallIntrospections::class => [
+ 'instanceOf' => \Friendica\Core\Logger\Util\Introspection::class,
+ 'constructParams' => [
+ \Friendica\Core\Logger\Util\Introspection::IGNORE_CLASS_LIST,
+ ],
+ ],
Cache\Capability\ICanCache::class => [
'instanceOf' => Cache\Factory\Cache::class,
'call' => [
['start', [], Dice::CHAIN_CALL],
],
],
+ IHandleUserSessions::class => [
+ 'instanceOf' => \Friendica\Core\Session\Model\UserSession::class,
+ ],
Cookie::class => [
'constructParams' => [
- $_SERVER, $_COOKIE
+ $_COOKIE
],
],
ICanWriteToStorage::class => [
['getBackend', [], Dice::CHAIN_CALL],
],
],
+ \Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs::class => [
+ 'instanceOf' => \Friendica\Core\KeyValueStorage\Type\DBKeyValueStorage::class,
+ ],
Network\HTTPClient\Capability\ICanSendHttpRequests::class => [
'instanceOf' => Network\HTTPClient\Factory\HttpClient::class,
'call' => [
$_SERVER
],
],
+ App\Request::class => [
+ 'constructParams' => [
+ $_SERVER
+ ],
+ ],
+ \Psr\Clock\ClockInterface::class => [
+ 'instanceOf' => Util\Clock\SystemClock::class
+ ],
+ \Friendica\Module\Special\HTTPException::class => [
+ 'constructParams' => [
+ $_SERVER
+ ],
+ ],
];