aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration/Resources/Manager.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-01-24 11:43:18 +0100
committerJulius Härtl <jus@bitgrid.net>2019-03-01 20:56:17 +0100
commitd85e3e3a6d775261cd4a504e07b111224cda8fc8 (patch)
treeae4a15f565ea0f819b9f92a54f1c34b05d7e85c2 /lib/private/Collaboration/Resources/Manager.php
parent88aa3de7842a5113de5f137ba57bdae1f77777b5 (diff)
downloadnextcloud-server-d85e3e3a6d775261cd4a504e07b111224cda8fc8.tar.gz
nextcloud-server-d85e3e3a6d775261cd4a504e07b111224cda8fc8.zip
Allow apps to register resource providers
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Collaboration/Resources/Manager.php')
-rw-r--r--lib/private/Collaboration/Resources/Manager.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php
index cc09089c711..071fa3c9436 100644
--- a/lib/private/Collaboration/Resources/Manager.php
+++ b/lib/private/Collaboration/Resources/Manager.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OC\Collaboration\Resources;
-use OCA\Files\Collaboration\Resources\ResourceProvider;
use OCP\Collaboration\Resources\CollectionException;
use OCP\Collaboration\Resources\ICollection;
use OCP\Collaboration\Resources\IManager;
@@ -39,6 +38,9 @@ class Manager implements IManager {
/** @var IDBConnection */
protected $connection;
+ /** @var IProvider[] */
+ protected $providers = [];
+
public function __construct(IDBConnection $connection) {
$this->connection = $connection;
}
@@ -96,9 +98,7 @@ class Manager implements IManager {
* @since 15.0.0
*/
public function getProviders(): array {
- return [
- \OC::$server->query(ResourceProvider::class) // FIXME
- ];
+ return $this->providers;
}
/**
@@ -155,4 +155,11 @@ class Manager implements IManager {
return false;
}
+
+ /**
+ * @param IProvider $provider
+ */
+ public function registerResourceProvider(IProvider $provider): void {
+ $this->providers[] = $provider;
+ }
}