summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/appinfo/application.php5
-rw-r--r--lib/private/server.php32
2 files changed, 37 insertions, 0 deletions
diff --git a/apps/files_external/appinfo/application.php b/apps/files_external/appinfo/application.php
index 1e43c737408..aa9e4fd913e 100644
--- a/apps/files_external/appinfo/application.php
+++ b/apps/files_external/appinfo/application.php
@@ -50,6 +50,11 @@ class Application extends App {
$this->loadBackends();
$this->loadAuthMechanisms();
+
+ // app developers: do NOT depend on this! it will disappear with oC 9.0!
+ \OC::$server->getEventDispatcher()->dispatch(
+ 'OCA\\Files_External::loadAdditionalBackends'
+ );
}
/**
diff --git a/lib/private/server.php b/lib/private/server.php
index bbf060a47b7..59d03c2df97 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -1061,4 +1061,36 @@ class Server extends SimpleContainer implements IServerContainer {
public function getSessionCryptoWrapper() {
return $this->query('CryptoWrapper');
}
+
+ /**
+ * Not a public API as of 8.2, wait for 9.0
+ * @return \OCA\Files_External\Service\BackendService
+ */
+ public function getStoragesBackendService() {
+ return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\BackendService');
+ }
+
+ /**
+ * Not a public API as of 8.2, wait for 9.0
+ * @return \OCA\Files_External\Service\GlobalStoragesService
+ */
+ public function getGlobalStoragesService() {
+ return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\GlobalStoragesService');
+ }
+
+ /**
+ * Not a public API as of 8.2, wait for 9.0
+ * @return \OCA\Files_External\Service\UserGlobalStoragesService
+ */
+ public function getUserGlobalStoragesService() {
+ return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\UserGlobalStoragesService');
+ }
+
+ /**
+ * Not a public API as of 8.2, wait for 9.0
+ * @return \OCA\Files_External\Service\UserStoragesService
+ */
+ public function getUserStoragesService() {
+ return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\UserStoragesService');
+ }
}