diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-09-29 20:57:00 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-12-07 22:04:07 +0100 |
commit | 001648037055985cc10f38d6ba1e0e71cac49af7 (patch) | |
tree | 9f4cf10544421a7a337e9d26a86cbc8aedabe65b /lib/public/Collaboration | |
parent | 2959487f71c8226036ac3614bce27e3bbe60418a (diff) | |
download | nextcloud-server-001648037055985cc10f38d6ba1e0e71cac49af7.tar.gz nextcloud-server-001648037055985cc10f38d6ba1e0e71cac49af7.zip |
Decouple resource provider registration
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/public/Collaboration')
-rw-r--r-- | lib/public/Collaboration/Resources/IManager.php | 1 | ||||
-rw-r--r-- | lib/public/Collaboration/Resources/IProviderManager.php | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/lib/public/Collaboration/Resources/IManager.php b/lib/public/Collaboration/Resources/IManager.php index 6cdd0e5a6e7..69f42bbbe0a 100644 --- a/lib/public/Collaboration/Resources/IManager.php +++ b/lib/public/Collaboration/Resources/IManager.php @@ -121,6 +121,7 @@ interface IManager extends IProvider { /** * @param string $provider * @since 16.0.0 + * @deprecated 18.0.0 Use IProviderManager::registerResourceProvider instead */ public function registerResourceProvider(string $provider): void; } diff --git a/lib/public/Collaboration/Resources/IProviderManager.php b/lib/public/Collaboration/Resources/IProviderManager.php new file mode 100644 index 00000000000..04a1212b315 --- /dev/null +++ b/lib/public/Collaboration/Resources/IProviderManager.php @@ -0,0 +1,41 @@ +<?php +declare(strict_types=1); +/** + * @copyright Copyright (c) 2019 Daniel Kesselberg <mail@danielkesselberg.de> + * + * @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/>. + * + */ + +namespace OCP\Collaboration\Resources; + +/** + * @since 18.0.0 + */ +interface IProviderManager { + + /** + * @return IProvider[] list of resource providers + * @since 18.0.0 + */ + public function getResourceProviders(): array; + + /** + * @param string $provider provider's class name + * @since 18.0.0 + */ + public function registerResourceProvider(string $provider): void; +} |