mirror of
https://github.com/friendica/friendica
synced 2025-05-10 20:24:10 +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
32
src/Model/Storage/AbstractStorage.php
Normal file
32
src/Model/Storage/AbstractStorage.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Model\Storage;
|
||||
|
||||
use Friendica\Core\L10n\L10n;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* A general storage class which loads common dependencies and implements common methods
|
||||
*/
|
||||
abstract class AbstractStorage implements IStorage
|
||||
{
|
||||
/** @var L10n */
|
||||
protected $l10n;
|
||||
/** @var LoggerInterface */
|
||||
protected $logger;
|
||||
|
||||
/**
|
||||
* @param L10n $l10n
|
||||
* @param LoggerInterface $logger
|
||||
*/
|
||||
public function __construct(L10n $l10n, LoggerInterface $logger)
|
||||
{
|
||||
$this->l10n = $l10n;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return static::getName();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue