aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Collaboration/Resources/IResource.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-09-14 12:34:24 +0200
committerJulius Härtl <jus@bitgrid.net>2019-03-01 20:56:15 +0100
commit69b530a44230028c278bda94984b7aaacd22a8a1 (patch)
treee88ef681df42cb2c5eda3cc08924eb6c2e0fbcbf /lib/public/Collaboration/Resources/IResource.php
parent49b104f3df08b453258eb1483173dc0b8c5e022b (diff)
downloadnextcloud-server-69b530a44230028c278bda94984b7aaacd22a8a1.tar.gz
nextcloud-server-69b530a44230028c278bda94984b7aaacd22a8a1.zip
Basic implementation of resource and collection handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Collaboration/Resources/IResource.php')
-rw-r--r--lib/public/Collaboration/Resources/IResource.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/public/Collaboration/Resources/IResource.php b/lib/public/Collaboration/Resources/IResource.php
new file mode 100644
index 00000000000..42631bc27a8
--- /dev/null
+++ b/lib/public/Collaboration/Resources/IResource.php
@@ -0,0 +1,48 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Joas Schilling <coding@schilljs.com>
+ *
+ * @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 15.0.0
+ */
+interface IResource {
+
+ /**
+ * @return string
+ * @since 15.0.0
+ */
+ public function getType(): string;
+
+ /**
+ * @return string
+ * @since 15.0.0
+ */
+ public function getId(): string;
+
+ /**
+ * @param IResource $resource
+ * @return ICollection[]
+ * @since 15.0.0
+ */
+ public function getCollections(IResource $resource): array;
+}