aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/ProviderFactory.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-05-30 14:24:22 +0200
committerGitHub <noreply@github.com>2024-05-30 14:24:22 +0200
commit258bb03cf59558351bcf47f089fd560de2d82399 (patch)
treeaa59ba898bf410cf8a30e8a8418926536a4537a6 /lib/private/Share20/ProviderFactory.php
parent1395a5360274a6c6c0b4084d22da53466998c954 (diff)
parent31b0a44cf65b6625636ea0fa15fb1a1122b525e1 (diff)
downloadnextcloud-server-258bb03cf59558351bcf47f089fd560de2d82399.tar.gz
nextcloud-server-258bb03cf59558351bcf47f089fd560de2d82399.zip
Merge branch 'master' into refactor/OC-Server-getSecureRandom
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Diffstat (limited to 'lib/private/Share20/ProviderFactory.php')
-rw-r--r--lib/private/Share20/ProviderFactory.php54
1 files changed, 16 insertions, 38 deletions
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php
index 03284b6d78d..ac276969033 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -1,35 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Bjoern Schiessle <bjoern@schiessle.org>
- * @author Björn Schießle <bjoern@schiessle.org>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Daniel Calviño Sánchez <danxuliu@gmail.com>
- * @author Joas Schilling <coding@schilljs.com>
- * @author John Molakvoæ <skjnldsv@protonmail.com>
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Maxence Lange <maxence@nextcloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Samuel <faust64@gmail.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Share20;
@@ -41,9 +15,13 @@ use OCA\FederatedFileSharing\TokenHandler;
use OCA\ShareByMail\Settings\SettingsManager;
use OCA\ShareByMail\ShareByMailProvider;
use OCA\Talk\Share\RoomShareProvider;
+use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Defaults;
use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\ICloudFederationFactory;
+use OCP\Files\IRootFolder;
use OCP\IServerContainer;
+use OCP\Security\IHasher;
use OCP\Security\ISecureRandom;
use OCP\Share\IManager;
use OCP\Share\IProviderFactory;
@@ -100,12 +78,12 @@ class ProviderFactory implements IProviderFactory {
$this->serverContainer->getDatabaseConnection(),
$this->serverContainer->getUserManager(),
$this->serverContainer->getGroupManager(),
- $this->serverContainer->getLazyRootFolder(),
+ $this->serverContainer->get(IRootFolder::class),
$this->serverContainer->getMailer(),
$this->serverContainer->query(Defaults::class),
$this->serverContainer->getL10NFactory(),
$this->serverContainer->getURLGenerator(),
- $this->serverContainer->getConfig()
+ $this->serverContainer->query(ITimeFactory::class),
);
}
@@ -142,7 +120,7 @@ class ProviderFactory implements IProviderFactory {
$this->serverContainer->query(\OCP\OCS\IDiscoveryService::class),
$this->serverContainer->getJobList(),
\OC::$server->getCloudFederationProviderManager(),
- \OC::$server->getCloudFederationFactory(),
+ \OC::$server->get(ICloudFederationFactory::class),
$this->serverContainer->query(IEventDispatcher::class),
$this->serverContainer->get(LoggerInterface::class),
);
@@ -156,7 +134,7 @@ class ProviderFactory implements IProviderFactory {
$notifications,
$tokenHandler,
$l,
- $this->serverContainer->getLazyRootFolder(),
+ $this->serverContainer->get(IRootFolder::class),
$this->serverContainer->getConfig(),
$this->serverContainer->getUserManager(),
$this->serverContainer->getCloudIdManager(),
@@ -191,15 +169,15 @@ class ProviderFactory implements IProviderFactory {
$this->serverContainer->getDatabaseConnection(),
$this->serverContainer->get(ISecureRandom::class),
$this->serverContainer->getUserManager(),
- $this->serverContainer->getLazyRootFolder(),
+ $this->serverContainer->get(IRootFolder::class),
$this->serverContainer->getL10N('sharebymail'),
- $this->serverContainer->getLogger(),
+ $this->serverContainer->get(LoggerInterface::class),
$this->serverContainer->getMailer(),
$this->serverContainer->getURLGenerator(),
$this->serverContainer->getActivityManager(),
$settingsManager,
$this->serverContainer->query(Defaults::class),
- $this->serverContainer->getHasher(),
+ $this->serverContainer->get(IHasher::class),
$this->serverContainer->get(IEventDispatcher::class),
$this->serverContainer->get(IManager::class)
);
@@ -233,7 +211,7 @@ class ProviderFactory implements IProviderFactory {
$this->serverContainer->getDatabaseConnection(),
$this->serverContainer->get(ISecureRandom::class),
$this->serverContainer->getUserManager(),
- $this->serverContainer->getLazyRootFolder(),
+ $this->serverContainer->get(IRootFolder::class),
$this->serverContainer->getL10N('circles'),
$this->serverContainer->getLogger(),
$this->serverContainer->getURLGenerator()