Result.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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\Search;
  8. /**
  9. * The generic result of a search
  10. * @since 7.0.0
  11. * @deprecated 20.0.0
  12. */
  13. class Result {
  14. /**
  15. * A unique identifier for the result, usually given as the item ID in its
  16. * corresponding application.
  17. * @var string
  18. * @since 7.0.0
  19. * @deprecated 20.0.0
  20. */
  21. public $id;
  22. /**
  23. * The name of the item returned; this will be displayed in the search
  24. * results.
  25. * @var string
  26. * @since 7.0.0
  27. * @deprecated 20.0.0
  28. */
  29. public $name;
  30. /**
  31. * URL to the application item.
  32. * @var string
  33. * @since 7.0.0
  34. * @deprecated 20.0.0
  35. */
  36. public $link;
  37. /**
  38. * The type of search result returned; for consistency, name this the same
  39. * as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
  40. * @var string
  41. * @since 7.0.0
  42. * @deprecated 20.0.0
  43. */
  44. public $type = 'generic';
  45. /**
  46. * Create a new search result
  47. * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]'
  48. * @param string $name displayed text of result
  49. * @param string $link URL to the result within its app
  50. * @since 7.0.0
  51. * @deprecated 20.0.0
  52. */
  53. public function __construct($id = null, $name = null, $link = null) {
  54. $this->id = $id;
  55. $this->name = $name;
  56. $this->link = $link;
  57. }
  58. }