X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FDI.php;h=8d706ed374a1ab3eb80b34280b983dcf0805dfa5;hb=89b6c4c73f372bcff10fb121fbfdbd9255bb824d;hp=bf2b5a2371cfb9dc26d9b769888952bcc583e534;hpb=e9c6611965848a5905668b8cad6fdfa4c701f609;p=friendica.git diff --git a/src/DI.php b/src/DI.php index bf2b5a2371..8d706ed374 100644 --- a/src/DI.php +++ b/src/DI.php @@ -1,6 +1,6 @@ setDependency(static::config(), static::profiler(), static::logger()); } /** * Returns a clone of the current dice instance - * This usefull for overloading the current instance with mocked methods during tests + * This useful for overloading the current instance with mocked methods during tests * * @return Dice */ @@ -101,10 +126,7 @@ abstract class DI return self::$dice->create(App\Arguments::class); } - /** - * @return App\BaseURL - */ - public static function baseUrl() + public static function baseUrl(): App\BaseURL { return self::$dice->create(App\BaseURL::class); } @@ -181,6 +203,16 @@ abstract class DI return self::$dice->create(Core\Config\Capability\IManageConfigValues::class); } + public static function configFileManager(): Core\Config\Util\ConfigFileManager + { + return self::$dice->create(Core\Config\Util\ConfigFileManager::class); + } + + public static function keyValue(): Core\KeyValueStorage\Capabilities\IManageKeyValuePairs + { + return self::$dice->create(Core\KeyValueStorage\Capabilities\IManageKeyValuePairs::class); + } + /** * @return Core\PConfig\Capability\IManagePersonalConfigValues */ @@ -347,14 +379,6 @@ abstract class DI return self::$dice->create(Factory\Api\Mastodon\Error::class); } - /** - * @return Factory\Api\Mastodon\FollowRequest - */ - public static function mstdnFollowRequest() - { - return self::$dice->create(Factory\Api\Mastodon\FollowRequest::class); - } - /** * @return Factory\Api\Mastodon\Poll */ @@ -597,6 +621,20 @@ abstract class DI return self::$dice->create(Navigation\Notifications\Factory\FormattedNavNotification::class); } + // + // "Federation" namespace instances + // + + public static function deliveryQueueItemFactory(): Federation\Factory\DeliveryQueueItem + { + return self::$dice->create(Federation\Factory\DeliveryQueueItem::class); + } + + public static function deliveryQueueItemRepo(): Federation\Repository\DeliveryQueueItem + { + return self::$dice->create(Federation\Repository\DeliveryQueueItem::class); + } + // // "Protocol" namespace instances //