mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
- Fixing SystemResource
- Adding tests for StorageManager - Updating doc
This commit is contained in:
parent
cc501439af
commit
dbd5b5bb6e
12 changed files with 547 additions and 59 deletions
|
@ -215,6 +215,11 @@ class SampleStorageBackend implements IStorage
|
|||
{
|
||||
return self::NAME;
|
||||
}
|
||||
|
||||
public static function getName()
|
||||
{
|
||||
return self::NAME;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -239,13 +244,13 @@ function samplestorage_install()
|
|||
// on addon install, we register our class with name "Sample Storage".
|
||||
// note: we use `::class` property, which returns full class name as string
|
||||
// this save us the problem of correctly escape backslashes in class name
|
||||
DI::facStorage()->register("Sample Storage", SampleStorageBackend::class);
|
||||
DI::facStorage()->register(SampleStorageBackend::class);
|
||||
}
|
||||
|
||||
function samplestorage_unistall()
|
||||
{
|
||||
// when the plugin is uninstalled, we unregister the backend.
|
||||
DI::facStorage()->unregister("Sample Storage");
|
||||
DI::facStorage()->unregister(SampleStorageBackend::class);
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue