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