You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

igroup.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. /**
  3. * @author Morris Jobke <hey@morrisjobke.de>
  4. * @author Robin Appelman <icewind@owncloud.com>
  5. *
  6. * @copyright Copyright (c) 2016, ownCloud, Inc.
  7. * @license AGPL-3.0
  8. *
  9. * This code is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License, version 3,
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>
  20. *
  21. */
  22. namespace OCP;
  23. /**
  24. * Interface IGroup
  25. *
  26. * @package OCP
  27. * @since 8.0.0
  28. */
  29. interface IGroup {
  30. /**
  31. * @return string
  32. * @since 8.0.0
  33. */
  34. public function getGID();
  35. /**
  36. * get all users in the group
  37. *
  38. * @return \OCP\IUser[]
  39. * @since 8.0.0
  40. */
  41. public function getUsers();
  42. /**
  43. * check if a user is in the group
  44. *
  45. * @param \OCP\IUser $user
  46. * @return bool
  47. * @since 8.0.0
  48. */
  49. public function inGroup($user);
  50. /**
  51. * add a user to the group
  52. *
  53. * @param \OCP\IUser $user
  54. * @since 8.0.0
  55. */
  56. public function addUser($user);
  57. /**
  58. * remove a user from the group
  59. *
  60. * @param \OCP\IUser $user
  61. * @since 8.0.0
  62. */
  63. public function removeUser($user);
  64. /**
  65. * search for users in the group by userid
  66. *
  67. * @param string $search
  68. * @param int $limit
  69. * @param int $offset
  70. * @return \OCP\IUser[]
  71. * @since 8.0.0
  72. */
  73. public function searchUsers($search, $limit = null, $offset = null);
  74. /**
  75. * returns the number of users matching the search string
  76. *
  77. * @param string $search
  78. * @return int|bool
  79. * @since 8.0.0
  80. */
  81. public function count($search = '');
  82. /**
  83. * search for users in the group by displayname
  84. *
  85. * @param string $search
  86. * @param int $limit
  87. * @param int $offset
  88. * @return \OCP\IUser[]
  89. * @since 8.0.0
  90. */
  91. public function searchDisplayName($search, $limit = null, $offset = null);
  92. /**
  93. * delete the group
  94. *
  95. * @return bool
  96. * @since 8.0.0
  97. */
  98. public function delete();
  99. }