3 * @file src/Model/Storage/SystemStorage.php
4 * @brief Storage backend system
7 namespace Friendica\Model\Storage;
10 * @brief System resource storage class
12 * This class is used to load system resources, like images.
13 * Is not intended to be selectable by admins as default storage class.
15 class SystemResource implements IStorage
17 // Valid folders to look for resources
18 const VALID_FOLDERS = ["images"];
20 public static function get($filename)
22 $folder = dirname($filename);
23 if (!in_array($folder, self::VALID_FOLDERS)) {
26 if (!file_exists($filename)) {
29 return file_get_contents($filename);
33 public static function put($data, $filename = "")
35 throw new \BadMethodCallException();
38 public static function delete($filename)
40 throw new \BadMethodCallException();
43 public static function getOptions()
48 public static function saveOptions($data)