* @method static Core\L10n\L10n l10n()
* @method static Core\Process process()
* @method static Core\Session\ISession session()
- * @method static Core\StorageManager facStorage()
+ * @method static Core\StorageManager storageManager()
* @method static Database\Database dba()
* @method static Factory\Mastodon\Account mstdnAccount()
* @method static Factory\Mastodon\FollowRequest mstdnFollowRequest()
abstract class DI
{
const CLASS_MAPPING = [
- 'app' => App::class,
- 'auth' => App\Authentication::class,
- 'args' => App\Arguments::class,
- 'baseUrl' => App\BaseURL::class,
- 'mode' => App\Mode::class,
- 'module' => App\Module::class,
- 'page' => App\Page::class,
- 'router' => App\Router::class,
- 'contentItem' => Content\Item::class,
- 'bbCodeVideo' => Content\Text\BBCode\Video::class,
- 'cache' => Core\Cache\ICache::class,
- 'config' => Core\Config\IConfiguration::class,
- 'pConfig' => Core\Config\IPConfiguration::class,
- 'l10n' => Core\L10n\L10n::class,
- 'lock' => Core\Lock\ILock::class,
- 'process' => Core\Process::class,
- 'session' => Core\Session\ISession::class,
- 'facStorage' => Core\StorageManager::class,
- 'dba' => Database\Database::class,
- 'mstdnAccount' => Factory\Mastodon\Account::class,
+ 'app' => App::class,
+ 'auth' => App\Authentication::class,
+ 'args' => App\Arguments::class,
+ 'baseUrl' => App\BaseURL::class,
+ 'mode' => App\Mode::class,
+ 'module' => App\Module::class,
+ 'page' => App\Page::class,
+ 'router' => App\Router::class,
+ 'contentItem' => Content\Item::class,
+ 'bbCodeVideo' => Content\Text\BBCode\Video::class,
+ 'cache' => Core\Cache\ICache::class,
+ 'config' => Core\Config\IConfiguration::class,
+ 'pConfig' => Core\Config\IPConfiguration::class,
+ 'l10n' => Core\L10n\L10n::class,
+ 'lock' => Core\Lock\ILock::class,
+ 'process' => Core\Process::class,
+ 'session' => Core\Session\ISession::class,
+ 'storageManager' => Core\StorageManager::class,
+ 'dba' => Database\Database::class,
+ 'mstdnAccount' => Factory\Mastodon\Account::class,
'mstdnFollowRequest' => Factory\Mastodon\FollowRequest::class,
'mstdnRelationship' => Factory\Mastodon\Relationship::class,
- 'cookie' => Model\User\Cookie::class,
- 'notify' => Model\Notify::class,
- 'storage' => Model\Storage\IStorage::class,
- 'intro' => Repository\Introduction::class,
- 'activity' => Protocol\Activity::class,
- 'aclFormatter' => Util\ACLFormatter::class,
- 'dtFormat' => Util\DateTimeFormat::class,
- 'fs' => Util\FileSystem::class,
- 'workerLogger' => Util\Logger\WorkerLogger::class,
- 'profiler' => Util\Profiler::class,
- 'logger' => LoggerInterface::class,
- 'devLogger' => '$devLogger',
+ 'cookie' => Model\User\Cookie::class,
+ 'notify' => Model\Notify::class,
+ 'storage' => Model\Storage\IStorage::class,
+ 'intro' => Repository\Introduction::class,
+ 'activity' => Protocol\Activity::class,
+ 'aclFormatter' => Util\ACLFormatter::class,
+ 'dtFormat' => Util\DateTimeFormat::class,
+ 'fs' => Util\FileSystem::class,
+ 'workerLogger' => Util\Logger\WorkerLogger::class,
+ 'profiler' => Util\Profiler::class,
+ 'logger' => LoggerInterface::class,
+ 'devLogger' => '$devLogger',
];
/** @var Dice */
}
$data = $i['data'];
} else {
- $backendClass = DI::facStorage()->getByName($photo['backend-class'] ?? '');
+ $backendClass = DI::storageManager()->getByName($photo['backend-class'] ?? '');
$backendRef = $photo['backend-ref'] ?? '';
$data = $backendClass->get($backendRef);
}
if (DBA::isResult($existing_photo)) {
$backend_ref = (string)$existing_photo["backend-ref"];
- $storage = DI::facStorage()->getByName($existing_photo["backend-class"] ?? '');
+ $storage = DI::storageManager()->getByName($existing_photo["backend-class"] ?? '');
} else {
$storage = DI::storage();
}
$photos = self::selectToArray(['backend-class', 'backend-ref'], $conditions);
foreach($photos as $photo) {
- $backend_class = DI::facStorage()->getByName($photo['backend-class'] ?? '');
+ $backend_class = DI::storageManager()->getByName($photo['backend-class'] ?? '');
if ($backend_class !== null) {
$backend_class->delete($photo["backend-ref"] ?? '');
}
$photos = self::selectToArray(['backend-class', 'backend-ref'], $conditions);
foreach($photos as $photo) {
- $backend_class = DI::facStorage()->getByName($photo['backend-class'] ?? '');
+ $backend_class = DI::storageManager()->getByName($photo['backend-class'] ?? '');
if ($backend_class !== null) {
$fields["backend-ref"] = $backend_class->put($img->asString(), $photo['backend-ref']);
} else {