This commit is contained in:
fabrixxm 2018-12-12 20:52:09 +01:00 committed by Hypolite Petovan
parent ce31ccaade
commit f8d2f81d81
1 changed files with 11 additions and 9 deletions

View File

@ -14,14 +14,16 @@ The class must implement `Friendica\Model\Storage\IStorage` interface. All metho
namespace Friendica\Model\Storage; namespace Friendica\Model\Storage;
interface IStorage ```php
{ interface IStorage
public static function get($ref); {
public static function put($data, $ref = ""); public static function get($ref);
public static function delete($ref); public static function put($data, $ref = "");
public static function getOptions(); public static function delete($ref);
public static function saveOptions($data); public static function getOptions();
} public static function saveOptions($data);
}
```
- `get($ref)` returns data pointed by `$ref` - `get($ref)` returns data pointed by `$ref`
- `put($data, $ref)` saves data in `$data` to position `$ref`, or a new position if `$ref` is empty. - `put($data, $ref)` saves data in `$data` to position `$ref`, or a new position if `$ref` is empty.
@ -196,7 +198,7 @@ function samplestorage_unistall()
// when the plugin is uninstalled, we unregister the backend. // when the plugin is uninstalled, we unregister the backend.
StorageManager::unregister("Sample Storage"); StorageManager::unregister("Sample Storage");
} }
```