X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FDI.php;h=ead125cff26138f1ef46458ba319f9c72808a38a;hb=55147a6b44164f28b64a876a48140a7cd821802f;hp=82364478448d1e3b4e61c3cebb629f44fbea8a5d;hpb=42425390593d1e7f86a30fe21a7ff9cfb7072859;p=friendica.git diff --git a/src/DI.php b/src/DI.php index 8236447844..ead125cff2 100644 --- a/src/DI.php +++ b/src/DI.php @@ -195,11 +195,11 @@ abstract class DI } /** - * @return Core\Process + * @return Core\Worker\Repository\Process */ public static function process() { - return self::$dice->create(Core\Process::class); + return self::$dice->create(Core\Worker\Repository\Process::class); } /** @@ -218,10 +218,30 @@ abstract class DI return self::$dice->create(Core\Storage\Repository\StorageManager::class); } + /** + * @return \Friendica\Core\System + */ + public static function system() + { + return self::$dice->create(Core\System::class); + } + // // "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 */ @@ -379,11 +399,11 @@ abstract class DI // "Model" namespace instances // /** - * @return Model\Process + * @return \Friendica\Core\Worker\Repository\Process */ public static function modelProcess() { - return self::$dice->create(Model\Process::class); + return self::$dice->create(Core\Worker\Repository\Process::class); } /** @@ -410,6 +430,15 @@ abstract class DI 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 //