1
0

ISearch.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Andrew Brown <andrew@casabrown.com>
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. * @author Jakob Sack <mail@jakobsack.de>
  8. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  9. * @author Morris Jobke <hey@morrisjobke.de>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. namespace OCP;
  27. /**
  28. * Small Interface for Search
  29. * @since 7.0.0
  30. * @deprecated 20.0.0
  31. */
  32. interface ISearch {
  33. /**
  34. * Search all providers for $query
  35. * @param string $query
  36. * @param string[] $inApps optionally limit results to the given apps
  37. * @param int $page pages start at page 1
  38. * @param int $size
  39. * @return array An array of OCP\Search\Result's
  40. * @since 8.0.0
  41. * @deprecated 20.0.0
  42. */
  43. public function searchPaged($query, array $inApps = [], $page = 1, $size = 30);
  44. /**
  45. * Register a new search provider to search with
  46. * @param string $class class name of a OCP\Search\Provider
  47. * @param array $options optional
  48. * @since 7.0.0
  49. * @deprecated 20.0.0
  50. */
  51. public function registerProvider($class, array $options = []);
  52. /**
  53. * Remove one existing search provider
  54. * @param string $provider class name of a OCP\Search\Provider
  55. * @since 7.0.0
  56. * @deprecated 20.0.0
  57. */
  58. public function removeProvider($provider);
  59. /**
  60. * Remove all registered search providers
  61. * @since 7.0.0
  62. * @deprecated 20.0.0
  63. */
  64. public function clearProviders();
  65. }