ISearchResult.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Collaboration\Collaborators;
  7. /**
  8. * Interface ISearchResult
  9. *
  10. * @since 13.0.0
  11. */
  12. interface ISearchResult {
  13. /**
  14. * @param SearchResultType $type
  15. * @param array $matches
  16. * @param array|null $exactMatches
  17. * @since 13.0.0
  18. */
  19. public function addResultSet(SearchResultType $type, array $matches, ?array $exactMatches = null);
  20. /**
  21. * @param SearchResultType $type
  22. * @param string $collaboratorId
  23. * @return bool
  24. * @since 13.0.0
  25. */
  26. public function hasResult(SearchResultType $type, $collaboratorId);
  27. /**
  28. * Removes all result where $collaborationId exactly matches shareWith of
  29. * any of wide and exact result matches of the given type.
  30. *
  31. * @since 22.0.0
  32. */
  33. public function removeCollaboratorResult(SearchResultType $type, string $collaboratorId): bool;
  34. /**
  35. * @param SearchResultType $type
  36. * @since 13.0.0
  37. */
  38. public function unsetResult(SearchResultType $type);
  39. /**
  40. * @param SearchResultType $type
  41. * @since 13.0.0
  42. */
  43. public function markExactIdMatch(SearchResultType $type);
  44. /**
  45. * @param SearchResultType $type
  46. * @return bool
  47. * @since 13.0.0
  48. */
  49. public function hasExactIdMatch(SearchResultType $type);
  50. /**
  51. * @return array
  52. * @since 13.0.0
  53. */
  54. public function asArray();
  55. }