ISearch.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCP;
  8. /**
  9. * Small Interface for Search
  10. * @since 7.0.0
  11. * @deprecated 20.0.0
  12. */
  13. interface ISearch {
  14. /**
  15. * Search all providers for $query
  16. * @param string $query
  17. * @param string[] $inApps optionally limit results to the given apps
  18. * @param int $page pages start at page 1
  19. * @param int $size
  20. * @return array An array of OCP\Search\Result's
  21. * @since 8.0.0
  22. * @deprecated 20.0.0
  23. */
  24. public function searchPaged($query, array $inApps = [], $page = 1, $size = 30);
  25. /**
  26. * Register a new search provider to search with
  27. * @param string $class class name of a OCP\Search\Provider
  28. * @param array $options optional
  29. * @since 7.0.0
  30. * @deprecated 20.0.0
  31. */
  32. public function registerProvider($class, array $options = []);
  33. /**
  34. * Remove one existing search provider
  35. * @param string $provider class name of a OCP\Search\Provider
  36. * @since 7.0.0
  37. * @deprecated 20.0.0
  38. */
  39. public function removeProvider($provider);
  40. /**
  41. * Remove all registered search providers
  42. * @since 7.0.0
  43. * @deprecated 20.0.0
  44. */
  45. public function clearProviders();
  46. }