]> git.mxchange.org Git - friendica.git/blobdiff - src/DI.php
updating date of security.txt validity
[friendica.git] / src / DI.php
index 28ad130b4da93719beddf67b594732b38f967974..4645ea252db915cfe171c8cccad5771fa4f8c18d 100644 (file)
@@ -39,6 +39,17 @@ abstract class DI
                self::$dice = $dice;
        }
 
+       /**
+        * Returns a clone of the current dice instance
+        * This usefull for overloading the current instance with mocked methods during tests
+        *
+        * @return Dice
+        */
+       public static function getDice()
+       {
+               return clone self::$dice;
+       }
+
        //
        // common instances
        //
@@ -394,16 +405,24 @@ abstract class DI
                return self::$dice->create(Model\Storage\IWritableStorage::class);
        }
 
+       /**
+        * @return Model\Log\ParsedLogIterator
+        */
+       public static function parsedLogIterator()
+       {
+               return self::$dice->create(Model\Log\ParsedLogIterator::class);
+       }
+
        //
        // "Network" namespace
        //
 
        /**
-        * @return Network\IHTTPRequest
+        * @return Network\IHTTPClient
         */
-       public static function httpRequest()
+       public static function httpClient()
        {
-               return self::$dice->create(Network\IHTTPRequest::class);
+               return self::$dice->create(Network\IHTTPClient::class);
        }
 
        //