From 1eeca031f863a652d07ebfa2f75339232bf60dc1 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Wed, 12 Aug 2015 20:03:11 +0100 Subject: Split backend identifiers from the class name Prior to this, the storage class name was stored in mount.json under the "class" parameter, and the auth mechanism class name under the "authMechanism" parameter. This decouples the class name from the identifier used to retrieve the backend or auth mechanism. Now, backends/auth mechanisms have a unique identifier, which is saved in the "backend" or "authMechanism" parameter in mount.json respectively. An identifier is considered unique for the object it references, but the underlying class may change (e.g. files_external gets pulled into core and namespaces are modified). --- apps/files_external/lib/backend/backend.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'apps/files_external/lib/backend') diff --git a/apps/files_external/lib/backend/backend.php b/apps/files_external/lib/backend/backend.php index 634bcb7bfbd..90d5d38ed94 100644 --- a/apps/files_external/lib/backend/backend.php +++ b/apps/files_external/lib/backend/backend.php @@ -27,6 +27,7 @@ use \OCA\Files_External\Lib\FrontendDefinitionTrait; use \OCA\Files_External\Lib\PriorityTrait; use \OCA\Files_External\Lib\DependencyTrait; use \OCA\Files_External\Lib\StorageModifierTrait; +use \OCA\Files_External\Lib\IdentifierTrait; use \OCA\Files_External\Lib\Auth\AuthMechanism; /** @@ -60,6 +61,7 @@ class Backend implements \JsonSerializable { use PriorityTrait; use DependencyTrait; use StorageModifierTrait; + use IdentifierTrait; /** @var string storage class */ private $storageClass; @@ -70,14 +72,6 @@ class Backend implements \JsonSerializable { /** @var AuthMechanism|callable authentication mechanism fallback */ private $legacyAuthMechanism; - /** - * @return string - */ - public function getClass() { - // return storage class for legacy compat - return $this->getStorageClass(); - } - /** * @return string */ -- cgit v1.2.3