Restructure Storage to new paradigm

pull/1196/head
Philipp 2021-10-23 12:11:37 +02:00
parent 0d3a35dbe9
commit 5184ca0fc2
No known key found for this signature in database
GPG Key ID: 24A7501396EB5432
3 changed files with 8 additions and 8 deletions

View File

@ -3,9 +3,9 @@
namespace Friendica\Addon\webdav_storage\src; namespace Friendica\Addon\webdav_storage\src;
use Exception; use Exception;
use Friendica\Model\Storage\IWritableStorage; use Friendica\Core\Storage\Capability\ICanWriteToStorage;
use Friendica\Model\Storage\ReferenceStorageException; use Friendica\Core\Storage\Exception\ReferenceStorageException;
use Friendica\Model\Storage\StorageException; use Friendica\Core\Storage\Exception\StorageException;
use Friendica\Network\HTTPClientOptions; use Friendica\Network\HTTPClientOptions;
use Friendica\Network\IHTTPClient; use Friendica\Network\IHTTPClient;
use Friendica\Util\Strings; use Friendica\Util\Strings;
@ -14,7 +14,7 @@ use Psr\Log\LoggerInterface;
/** /**
* A WebDav Backend Storage class * A WebDav Backend Storage class
*/ */
class WebDav implements IWritableStorage class WebDav implements ICanWriteToStorage
{ {
const NAME = 'WebDav'; const NAME = 'WebDav';
@ -253,7 +253,7 @@ class WebDav implements IWritableStorage
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function __toString() public function __toString(): string
{ {
return self::getName(); return self::getName();
} }

View File

@ -4,14 +4,14 @@ namespace Friendica\Addon\webdav_storage\src;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n; use Friendica\Core\L10n;
use Friendica\Model\Storage\IStorageConfiguration; use Friendica\Core\Storage\Capability\ICanConfigureStorage;
use Friendica\Network\HTTPClientOptions; use Friendica\Network\HTTPClientOptions;
use Friendica\Network\IHTTPClient; use Friendica\Network\IHTTPClient;
/** /**
* The WebDav Backend Storage configuration class * The WebDav Backend Storage configuration class
*/ */
class WebDavConfig implements IStorageConfiguration class WebDavConfig implements ICanConfigureStorage
{ {
const NAME = 'WebDav'; const NAME = 'WebDav';

View File

@ -5,7 +5,7 @@ namespace Friendica\Addon\webdav_storage\tests;
use Friendica\Addon\webdav_storage\src\WebDav; use Friendica\Addon\webdav_storage\src\WebDav;
use Friendica\DI; use Friendica\DI;
use Friendica\Factory\HTTPClientFactory; use Friendica\Factory\HTTPClientFactory;
use Friendica\Test\src\Model\Storage\StorageTest; use Friendica\Test\src\Core\Storage\StorageTest;
use Friendica\Util\Logger\VoidLogger; use Friendica\Util\Logger\VoidLogger;
/// @todo remove when constant is moved to a class constant /// @todo remove when constant is moved to a class constant