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\IConfiguration
138 public static function config()
140 return self::$dice->create(Core\Config\IConfiguration::class);
144 * @return Core\Config\IPConfiguration
146 public static function pConfig()
148 return self::$dice->create(Core\Config\IPConfiguration::class);
152 * @return Core\Lock\ILock
154 public static function lock()
156 return self::$dice->create(Core\Lock\ILock::class);
159 public static function l10n()
161 return self::$dice->create(Core\L10n\L10n::class);
165 * @return Core\Process
167 public static function process()
169 return self::$dice->create(Core\Process::class);
173 * @return Core\Session\ISession
175 public static function session()
177 return self::$dice->create(Core\Session\ISession::class);
181 * @return Core\StorageManager
183 public static function storageManager()
185 return self::$dice->create(Core\StorageManager::class);
189 // "LoggerInterface" instances
193 * @return LoggerInterface
195 public static function logger()
197 return self::$dice->create(LoggerInterface::class);
201 * @return LoggerInterface
203 public static function devLogger()
205 return self::$dice->create('$devLogger');
209 * @return LoggerInterface
211 public static function workerLogger()
213 return self::$dice->create(Util\Logger\WorkerLogger::class);
217 // "Factory" namespace instances
221 * @return Factory\Mastodon\Account
223 public static function mstdnAccount()
225 return self::$dice->create(Factory\Mastodon\Account::class);
229 * @return Factory\Mastodon\FollowRequest
231 public static function mstdnFollowRequest()
233 return self::$dice->create(Factory\Mastodon\FollowRequest::class);
237 * @return Factory\Mastodon\Relationship
239 public static function mstdnRelationship()
241 return self::$dice->create(Factory\Mastodon\Relationship::class);
245 // "Model" namespace instances
249 * @return Model\User\Cookie
251 public static function cookie()
253 return self::$dice->create(Model\User\Cookie::class);
257 * @return Model\Notify
259 public static function notify()
261 return self::$dice->create(Model\Notify::class);
265 * @return Model\Storage\IStorage
267 public static function storage()
269 return self::$dice->create(Model\Storage\IStorage::class);
273 // "Repository" namespace
277 * @return Repository\Introduction
279 public static function intro()
281 return self::$dice->create(Repository\Introduction::class);
285 // "Protocol" namespace instances
289 * @return Protocol\Activity
291 public static function activity()
293 return self::$dice->create(Protocol\Activity::class);
297 // "Util" namespace instances
301 * @return Util\ACLFormatter
303 public static function aclFormatter()
305 return self::$dice->create(Util\ACLFormatter::class);
309 * @return Util\DateTimeFormat
311 public static function dtFormat()
313 return self::$dice->create(Util\DateTimeFormat::class);
317 * @return Util\FileSystem
319 public static function fs()
321 return self::$dice->create(Util\FileSystem::class);
325 * @return Util\Profiler
327 public static function profiler()
329 return self::$dice->create(Util\Profiler::class);