aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib/FederatedShareProviderFactory.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-13 16:23:59 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-07-14 16:34:43 +0200
commit7e281a07bb66a082a35cbdd52f7d1e418beb4f53 (patch)
tree9a2ab162c879eec9ede9087d2869a490c3988a49 /apps/provisioning_api/lib/FederatedShareProviderFactory.php
parent2c87ce60a04eb98533d430ef7abe386ef0d04c2a (diff)
downloadnextcloud-server-7e281a07bb66a082a35cbdd52f7d1e418beb4f53.tar.gz
nextcloud-server-7e281a07bb66a082a35cbdd52f7d1e418beb4f53.zip
Use IBootstrap for the app federatedfilesharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/provisioning_api/lib/FederatedShareProviderFactory.php')
-rw-r--r--apps/provisioning_api/lib/FederatedShareProviderFactory.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/FederatedShareProviderFactory.php b/apps/provisioning_api/lib/FederatedShareProviderFactory.php
new file mode 100644
index 00000000000..45da52e6196
--- /dev/null
+++ b/apps/provisioning_api/lib/FederatedShareProviderFactory.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+declare(strict_types=1);
+
+namespace OCA\Provisioning_API;
+
+use OCA\FederatedFileSharing\FederatedShareProvider;
+use OCP\IServerContainer;
+
+class FederatedShareProviderFactory {
+
+ /** @var IServerContainer */
+ private $serverContainer;
+
+ public function __construct(IServerContainer $serverContainer) {
+ $this->serverContainer = $serverContainer;
+ }
+
+ public function get(): FederatedShareProvider {
+ return $this->serverContainer->query(FederatedShareProvider::class);
+ }
+}