]> git.mxchange.org Git - friendica.git/blobdiff - src/DI.php
Merge pull request #12277 from nupplaphil/mod/fbrowser
[friendica.git] / src / DI.php
index e8fa90eb9bb7114718c21094b3a2ea4276b5b2bc..3a8a9b6d2474eabea20815bed10269ba58cb5fd0 100644 (file)
@@ -22,6 +22,9 @@
 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;
 
 /**
@@ -210,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
         */
@@ -234,6 +239,14 @@ abstract class DI
                return self::$dice->create(Core\System::class);
        }
 
+       /**
+        * @return \Friendica\Navigation\SystemMessages
+        */
+       public static function sysmsg()
+       {
+               return self::$dice->create(SystemMessages::class);
+       }
+
        //
        // "LoggerInterface" instances
        //
@@ -366,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
         */