]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Storage/SystemResource.php
Replaced quotes
[friendica.git] / src / Model / Storage / SystemResource.php
index 203e9a2892125a1ecbf21009fec326982283d00b..3afe8ee6f5e7f88bc5cf6b2cdbffbfc6179e9513 100644 (file)
@@ -1,39 +1,55 @@
 <?php
 /**
  * @file src/Model/Storage/SystemStorage.php
+ * @brief Storage backend system
  */
 
 namespace Friendica\Model\Storage;
 
+use \BadMethodCallException;
+
 /**
  * @brief System resource storage class
  *
  * This class is used to load system resources, like images.
- * Is not itended to be selectable by admins as default storage class.
+ * Is not intended to be selectable by admins as default storage class.
  */
-class SystemResource
+class SystemResource implements IStorage
 {
        // Valid folders to look for resources
-       const VALID_FOLDERS = [ "images" ];
-
-       /**
-        * @brief get data
-        *
-        * @param string  $resourceid
-        *
-        * @return string
-        */
-       static function get($filename)
+       const VALID_FOLDERS = ["images"];
+
+       public static function get($filename)
        {
                $folder = dirname($filename);
-               if (!in_array($folder, self::VALID_FOLDERS)) return "";
-               if (!file_exists($filename)) return "";
+               if (!in_array($folder, self::VALID_FOLDERS)) {
+                       return "";
+               }
+               if (!file_exists($filename)) {
+                       return "";
+               }
                return file_get_contents($filename);
        }
 
-       static function put($filename, $data)
+
+       public static function put($data, $filename = "")
+       {
+               throw new BadMethodCallException();
+       }
+
+       public static function delete($filename)
+       {
+               throw new BadMethodCallException();
+       }
+
+       public static function getOptions()
+       {
+               return [];
+       }
+
+       public static function saveOptions($data)
        {
-               throw new \BadMethodCallException();
+               return [];
        }
 }