6 use Psr\Log\LoggerInterface;
9 * This class is capable of getting all dynamic created classes
11 * @see https://designpatternsphp.readthedocs.io/en/latest/Structural/Registry/README.html
18 public static function init(Dice $dice)
30 public static function app()
32 return self::$dice->create(App::class);
36 * @return Database\Database
38 public static function dba()
40 return self::$dice->create(Database\Database::class);
44 // "App" namespace instances
48 * @return App\Authentication
50 public static function auth()
52 return self::$dice->create(App\Authentication::class);
56 * @return App\Arguments
58 public static function args()
60 return self::$dice->create(App\Arguments::class);
66 public static function baseUrl()
68 return self::$dice->create(App\BaseURL::class);
74 public static function mode()
76 return self::$dice->create(App\Mode::class);
82 public static function module()
84 return self::$dice->create(App\Module::class);
90 public static function page()
92 return self::$dice->create(App\Page::class);
98 public static function router()
100 return self::$dice->create(App\Router::class);
104 // "Content" namespace instances
108 * @return Content\Item
110 public static function contentItem()
112 return self::$dice->create(Content\Item::class);
116 * @return Content\Text\BBCode\Video
118 public static function bbCodeVideo()
120 return self::$dice->create(Content\Text\BBCode\Video::class);
124 // "Core" namespace instances
128 * @return Core\Cache\ICache
130 public static function cache()
132 return self::$dice->create(Core\Cache\ICache::class);
136 * @return Core\Config\IConfig
138 public static function config()
140 return self::$dice->create(Core\Config\IConfig::class);
144 * @return \Friendica\Core\PConfig\IPConfig
146 public static function pConfig()
148 return self::$dice->create(Core\PConfig\IPConfig::class);
152 * @return Core\Lock\ILock
154 public static function lock()
156 return self::$dice->create(Core\Lock\ILock::class);
162 public static function l10n()
164 return self::$dice->create(Core\L10n::class);
168 * @return Core\Process
170 public static function process()
172 return self::$dice->create(Core\Process::class);
176 * @return Core\Session\ISession
178 public static function session()
180 return self::$dice->create(Core\Session\ISession::class);
184 * @return Core\StorageManager
186 public static function storageManager()
188 return self::$dice->create(Core\StorageManager::class);
192 // "LoggerInterface" instances
196 * @return LoggerInterface
198 public static function logger()
200 return self::$dice->create(LoggerInterface::class);
204 * @return LoggerInterface
206 public static function devLogger()
208 return self::$dice->create('$devLogger');
212 * @return LoggerInterface
214 public static function workerLogger()
216 return self::$dice->create(Util\Logger\WorkerLogger::class);
220 // "Factory" namespace instances
224 * @return Factory\Mastodon\Account
226 public static function mstdnAccount()
228 return self::$dice->create(Factory\Mastodon\Account::class);
232 * @return Factory\Mastodon\FollowRequest
234 public static function mstdnFollowRequest()
236 return self::$dice->create(Factory\Mastodon\FollowRequest::class);
240 * @return Factory\Mastodon\Relationship
242 public static function mstdnRelationship()
244 return self::$dice->create(Factory\Mastodon\Relationship::class);
248 * @return \Friendica\Factory\Notification\NotificationFactory
250 public static function factNotification()
252 return self::$dice->create(Factory\Notification\NotificationFactory::class);
256 * @return \Friendica\Factory\Notification\IntroductionFactory
258 public static function factNotIntro()
260 return self::$dice->create(Factory\Notification\IntroductionFactory::class);
264 // "Model" namespace instances
268 * @return Model\User\Cookie
270 public static function cookie()
272 return self::$dice->create(Model\User\Cookie::class);
276 * @return Repository\Notification
278 public static function notification()
280 return self::$dice->create(Repository\Notification::class);
284 * @return Model\Storage\IStorage
286 public static function storage()
288 return self::$dice->create(Model\Storage\IStorage::class);
292 // "Repository" namespace
296 * @return Repository\Introduction
298 public static function intro()
300 return self::$dice->create(Repository\Introduction::class);
304 * @return Repository\PermissionSet
306 public static function permissionSet()
308 return self::$dice->create(Repository\PermissionSet::class);
312 * @return Repository\ProfileField
314 public static function profileField()
316 return self::$dice->create(Repository\ProfileField::class);
320 // "Protocol" namespace instances
324 * @return Protocol\Activity
326 public static function activity()
328 return self::$dice->create(Protocol\Activity::class);
332 // "Util" namespace instances
336 * @return Util\ACLFormatter
338 public static function aclFormatter()
340 return self::$dice->create(Util\ACLFormatter::class);
344 * @return Util\DateTimeFormat
346 public static function dtFormat()
348 return self::$dice->create(Util\DateTimeFormat::class);
352 * @return Util\FileSystem
354 public static function fs()
356 return self::$dice->create(Util\FileSystem::class);
360 * @return Util\Profiler
362 public static function profiler()
364 return self::$dice->create(Util\Profiler::class);