From bd77cd98c9746e2c7997fb72409d83b15cc7eaa9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 14 Jan 2016 13:58:45 +0100 Subject: [PATCH] allow apps to add an OCP GroupInterface backend --- lib/private/group/backend.php | 6 +++--- lib/private/group/manager.php | 5 +++-- lib/public/igroupmanager.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/private/group/backend.php b/lib/private/group/backend.php index 29f24fb3070..ed2a2f4bb68 100644 --- a/lib/private/group/backend.php +++ b/lib/private/group/backend.php @@ -53,7 +53,7 @@ define('OC_GROUP_BACKEND_COUNT_USERS', 0x00100000); /** * Abstract base class for user management */ -abstract class OC_Group_Backend implements OC_Group_Interface { +abstract class OC_Group_Backend implements \OCP\GroupInterface { /** * error code for functions not provided by the group backend */ @@ -82,7 +82,7 @@ abstract class OC_Group_Backend implements OC_Group_Interface { * @return int bitwise-or'ed actions * * Returns the supported actions as int to be - * compared with OC_USER_BACKEND_CREATE_USER etc. + * compared with \OC_Group_Backend::CREATE_GROUP etc. */ public function getSupportedActions() { $actions = 0; @@ -101,7 +101,7 @@ abstract class OC_Group_Backend implements OC_Group_Interface { * @return bool * * Returns the supported actions as int to be - * compared with OC_GROUP_BACKEND_CREATE_GROUP etc. + * compared with \OC_Group_Backend::CREATE_GROUP etc. */ public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 8a21c77b58b..2c28f3b0e7f 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -33,6 +33,7 @@ namespace OC\Group; use OC\Hooks\PublicEmitter; +use OCP\GroupInterface; use OCP\IGroupManager; /** @@ -52,7 +53,7 @@ use OCP\IGroupManager; */ class Manager extends PublicEmitter implements IGroupManager { /** - * @var \OC_Group_Backend[]|\OC_Group_Database[] $backends + * @var GroupInterface[] $backends */ private $backends = array(); @@ -121,7 +122,7 @@ class Manager extends PublicEmitter implements IGroupManager { } /** - * @param \OC_Group_Backend $backend + * @param \OCP\GroupInterface $backend */ public function addBackend($backend) { $this->backends[] = $backend; diff --git a/lib/public/igroupmanager.php b/lib/public/igroupmanager.php index 5ec780e4471..7eabc8a59b0 100644 --- a/lib/public/igroupmanager.php +++ b/lib/public/igroupmanager.php @@ -53,7 +53,7 @@ interface IGroupManager { public function isBackendUsed($backendClass); /** - * @param \OCP\UserInterface $backend + * @param \OCP\GroupInterface $backend * @since 8.0.0 */ public function addBackend($backend); -- 2.39.5