6 use Friendica\Core\L10n;
7 use Psr\Log\LoggerInterface;
10 * This class is capable of getting all dynamic created classes
12 * @see https://designpatternsphp.readthedocs.io/en/latest/Structural/Registry/README.html
19 public static function init(Dice $dice)
31 public static function app()
33 return self::$dice->create(App::class);
37 * @return Database\Database
39 public static function dba()
41 return self::$dice->create(Database\Database::class);
45 // "App" namespace instances
49 * @return App\Authentication
51 public static function auth()
53 return self::$dice->create(App\Authentication::class);
57 * @return App\Arguments
59 public static function args()
61 return self::$dice->create(App\Arguments::class);
67 public static function baseUrl()
69 return self::$dice->create(App\BaseURL::class);
75 public static function mode()
77 return self::$dice->create(App\Mode::class);
83 public static function module()
85 return self::$dice->create(App\Module::class);
91 public static function page()
93 return self::$dice->create(App\Page::class);
99 public static function router()
101 return self::$dice->create(App\Router::class);
105 // "Content" namespace instances
109 * @return Content\Item
111 public static function contentItem()
113 return self::$dice->create(Content\Item::class);
117 * @return Content\Text\BBCode\Video
119 public static function bbCodeVideo()
121 return self::$dice->create(Content\Text\BBCode\Video::class);
125 // "Core" namespace instances
129 * @return Core\Cache\ICache
131 public static function cache()
133 return self::$dice->create(Core\Cache\ICache::class);
137 * @return Core\Config\IConfiguration
139 public static function config()
141 return self::$dice->create(Core\Config\IConfiguration::class);
145 * @return Core\Config\IPConfiguration
147 public static function pConfig()
149 return self::$dice->create(Core\Config\IPConfiguration::class);
153 * @return Core\Lock\ILock
155 public static function lock()
157 return self::$dice->create(Core\Lock\ILock::class);
163 public static function l10n()
165 return self::$dice->create(Core\L10n::class);
169 * @return Core\Process
171 public static function process()
173 return self::$dice->create(Core\Process::class);
177 * @return Core\Session\ISession
179 public static function session()
181 return self::$dice->create(Core\Session\ISession::class);
185 * @return Core\StorageManager
187 public static function storageManager()
189 return self::$dice->create(Core\StorageManager::class);
193 // "LoggerInterface" instances
197 * @return LoggerInterface
199 public static function logger()
201 return self::$dice->create(LoggerInterface::class);
205 * @return LoggerInterface
207 public static function devLogger()
209 return self::$dice->create('$devLogger');
213 * @return LoggerInterface
215 public static function workerLogger()
217 return self::$dice->create(Util\Logger\WorkerLogger::class);
221 // "Factory" namespace instances
225 * @return Factory\Mastodon\Account
227 public static function mstdnAccount()
229 return self::$dice->create(Factory\Mastodon\Account::class);
233 * @return Factory\Mastodon\FollowRequest
235 public static function mstdnFollowRequest()
237 return self::$dice->create(Factory\Mastodon\FollowRequest::class);
241 * @return Factory\Mastodon\Relationship
243 public static function mstdnRelationship()
245 return self::$dice->create(Factory\Mastodon\Relationship::class);
249 // "Model" namespace instances
253 * @return Model\User\Cookie
255 public static function cookie()
257 return self::$dice->create(Model\User\Cookie::class);
261 * @return Model\Notify
263 public static function notify()
265 return self::$dice->create(Model\Notify::class);
269 * @return Model\Storage\IStorage
271 public static function storage()
273 return self::$dice->create(Model\Storage\IStorage::class);
277 // "Repository" namespace
281 * @return Repository\Introduction
283 public static function intro()
285 return self::$dice->create(Repository\Introduction::class);
289 // "Protocol" namespace instances
293 * @return Protocol\Activity
295 public static function activity()
297 return self::$dice->create(Protocol\Activity::class);
301 // "Util" namespace instances
305 * @return Util\ACLFormatter
307 public static function aclFormatter()
309 return self::$dice->create(Util\ACLFormatter::class);
313 * @return Util\DateTimeFormat
315 public static function dtFormat()
317 return self::$dice->create(Util\DateTimeFormat::class);
321 * @return Util\FileSystem
323 public static function fs()
325 return self::$dice->create(Util\FileSystem::class);
329 * @return Util\Profiler
331 public static function profiler()
333 return self::$dice->create(Util\Profiler::class);