return self::$dice->create(App\Mode::class);
}
- /**
- * @return App\Module
- */
- public static function module()
- {
- return self::$dice->create(App\Module::class);
- }
-
/**
* @return App\Page
*/
// "LoggerInterface" instances
//
+ /**
+ * Flushes the Logger instance, so the factory is called again
+ * (creates a new id and retrieves the current PID)
+ */
+ public static function flushLogger()
+ {
+ $flushDice = self::$dice
+ ->addRule(LoggerInterface::class, self::$dice->getRule(LoggerInterface::class))
+ ->addRule('$devLogger', self::$dice->getRule('$devLogger'));
+ static::init($flushDice);
+ }
+
/**
* @return LoggerInterface
*/
// "Factory" namespace instances
//
+ /**
+ * @return Factory\Api\Friendica\Activities
+ */
+ public static function friendicaActivities()
+ {
+ return self::$dice->create(Factory\Api\Friendica\Activities::class);
+ }
+
/**
* @return Factory\Api\Mastodon\Account
*/
return self::$dice->create(Factory\Api\Mastodon\Notification::class);
}
+ /**
+ * @return Factory\Api\Twitter\Status
+ */
+ public static function twitterStatus()
+ {
+ return self::$dice->create(Factory\Api\Twitter\Status::class);
+ }
+
/**
* @return Factory\Api\Twitter\User
*/
return self::$dice->create(Model\Log\ParsedLogIterator::class);
}
+ //
+ // "Module" namespace
+ //
+
+ public static function apiResponse(): Module\Api\ApiResponse
+ {
+ return self::$dice->create(Module\Api\ApiResponse::class);
+ }
+
//
// "Network" namespace
//