mirror of
https://github.com/friendica/friendica
synced 2025-04-29 13:04:23 +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
|
@ -21,7 +21,7 @@ use Psr\Log\LoggerInterface;
|
|||
* Each new resource gets a value as reference and is saved in a
|
||||
* folder tree stucture created from that value.
|
||||
*/
|
||||
class Filesystem implements IStorage
|
||||
class Filesystem extends AbstractStorage
|
||||
{
|
||||
const NAME = 'Filesystem';
|
||||
|
||||
|
@ -30,10 +30,6 @@ class Filesystem implements IStorage
|
|||
|
||||
/** @var IConfiguration */
|
||||
private $config;
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
/** @var L10n */
|
||||
private $l10n;
|
||||
|
||||
/** @var string */
|
||||
private $basePath;
|
||||
|
@ -47,9 +43,9 @@ class Filesystem implements IStorage
|
|||
*/
|
||||
public function __construct(IConfiguration $config, LoggerInterface $logger, L10n $l10n)
|
||||
{
|
||||
parent::__construct($l10n, $logger);
|
||||
|
||||
$this->config = $config;
|
||||
$this->logger = $logger;
|
||||
$this->l10n = $l10n;
|
||||
|
||||
$path = $this->config->get('storage', 'filesystem_path', self::DEFAULT_BASE_FOLDER);
|
||||
$this->basePath = rtrim($path, '/');
|
||||
|
@ -185,7 +181,7 @@ class Filesystem implements IStorage
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __toString()
|
||||
public static function getName()
|
||||
{
|
||||
return self::NAME;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue