summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/backend
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-12 20:03:11 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-19 10:05:11 +0100
commit1eeca031f863a652d07ebfa2f75339232bf60dc1 (patch)
tree2f4b046e3506d4e9e385415bf01961f9b9978d97 /apps/files_external/lib/backend
parent272a46ebe1a5e195a078dde74f5f2ad941923d9e (diff)
downloadnextcloud-server-1eeca031f863a652d07ebfa2f75339232bf60dc1.tar.gz
nextcloud-server-1eeca031f863a652d07ebfa2f75339232bf60dc1.zip
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).
Diffstat (limited to 'apps/files_external/lib/backend')
-rw-r--r--apps/files_external/lib/backend/backend.php10
1 files changed, 2 insertions, 8 deletions
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;
@@ -73,14 +75,6 @@ class Backend implements \JsonSerializable {
/**
* @return string
*/
- public function getClass() {
- // return storage class for legacy compat
- return $this->getStorageClass();
- }
-
- /**
- * @return string
- */
public function getStorageClass() {
return $this->storageClass;
}