]> git.mxchange.org Git - friendica.git/blobdiff - src/DI.php
Cleanup work with the activity types
[friendica.git] / src / DI.php
index a28eb707a4c33a8de497acc3664cb9f35fa53f4f..bf2b5a2371cfb9dc26d9b769888952bcc583e534 100644 (file)
@@ -22,6 +22,8 @@
 namespace Friendica;
 
 use Dice\Dice;
+use Friendica\Core\Session\Capability\IHandleSessions;
+use Friendica\Core\Session\Capability\IHandleUserSessions;
 use Friendica\Navigation\SystemMessages;
 use Psr\Log\LoggerInterface;
 
@@ -211,14 +213,16 @@ abstract class DI
                return self::$dice->create(Core\Worker\Repository\Process::class);
        }
 
-       /**
-        * @return Core\Session\Capability\IHandleSessions
-        */
-       public static function session()
+       public static function session(): IHandleSessions
        {
                return self::$dice->create(Core\Session\Capability\IHandleSessions::class);
        }
 
+       public static function userSession(): IHandleUserSessions
+       {
+               return self::$dice->create(Core\Session\Capability\IHandleUserSessions::class);
+       }
+
        /**
         * @return \Friendica\Core\Storage\Repository\StorageManager
         */
@@ -375,6 +379,14 @@ abstract class DI
                return self::$dice->create(Factory\Api\Mastodon\Status::class);
        }
 
+       /**
+        * @return Factory\Api\Mastodon\StatusSource
+        */
+       public static function mstdnStatusSource()
+       {
+               return self::$dice->create(Factory\Api\Mastodon\StatusSource::class);
+       }
+
        /**
         * @return Factory\Api\Mastodon\ScheduledStatus
         */
@@ -520,6 +532,16 @@ abstract class DI
                return self::$dice->create(Contact\Introduction\Factory\Introduction::class);
        }
 
+       public static function report(): Moderation\Repository\Report
+       {
+               return self::$dice->create(Moderation\Repository\Report::class);
+       }
+
+       public static function reportFactory(): Moderation\Factory\Report
+       {
+               return self::$dice->create(Moderation\Factory\Report::class);
+       }
+
        public static function localRelationship(): Contact\LocalRelationship\Repository\LocalRelationship
        {
                return self::$dice->create(Contact\LocalRelationship\Repository\LocalRelationship::class);
@@ -587,6 +609,11 @@ abstract class DI
                return self::$dice->create(Protocol\Activity::class);
        }
 
+       public static function dsprContact(): Protocol\Diaspora\Repository\DiasporaContact
+       {
+               return self::$dice->create(Protocol\Diaspora\Repository\DiasporaContact::class);
+       }
+
        //
        // "Security" namespace instances
        //