summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-09-19 19:02:15 +0200
committerRobin Appelman <robin@icewind.nl>2018-10-17 14:57:30 +0200
commit565d830c1102e139b36a33d75ac4201be382426f (patch)
tree025eee6adffe0aa302c96fd7d5645454e0f222ac /lib/private/Server.php
parentea42474b318815db33c125400b74600d852df89d (diff)
downloadnextcloud-server-565d830c1102e139b36a33d75ac4201be382426f.tar.gz
nextcloud-server-565d830c1102e139b36a33d75ac4201be382426f.zip
expose storagefactory in server container
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 5ea1b697391..e0bd8084282 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -80,6 +80,7 @@ use OC\Files\Mount\ObjectHomeMountProvider;
use OC\Files\Node\HookConnector;
use OC\Files\Node\LazyRoot;
use OC\Files\Node\Root;
+use OC\Files\Storage\StorageFactory;
use OC\Files\View;
use OC\Http\Client\ClientService;
use OC\IntegrityCheck\Checker;
@@ -135,6 +136,7 @@ use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudIdManager;
use OCP\Authentication\LoginCredentials\IStore;
use OCP\Files\NotFoundException;
+use OCP\Files\Storage\IStorageFactory;
use OCP\GlobalScale\IConfig;
use OCP\ICacheFactory;
use OCP\IDBConnection;
@@ -1174,6 +1176,10 @@ class Server extends ServerContainer implements IServerContainer {
});
$this->registerAlias(IContactsStore::class, ContactsStore::class);
+ $this->registerService(IStorageFactory::class, function() {
+ return new StorageFactory();
+ });
+
$this->registerAlias(IDashboardManager::class, Dashboard\DashboardManager::class);
$this->connectDispatcher();
@@ -2024,4 +2030,11 @@ class Server extends ServerContainer implements IServerContainer {
public function getRemoteInstanceFactory() {
return $this->query(IInstanceFactory::class);
}
+
+ /**
+ * @return IStorageFactory
+ */
+ public function getStorageFactory() {
+ return $this->query(IStorageFactory::class);
+ }
}