1
0

Result.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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\Search;
  27. /**
  28. * The generic result of a search
  29. * @since 7.0.0
  30. * @deprecated 20.0.0
  31. */
  32. class Result {
  33. /**
  34. * A unique identifier for the result, usually given as the item ID in its
  35. * corresponding application.
  36. * @var string
  37. * @since 7.0.0
  38. * @deprecated 20.0.0
  39. */
  40. public $id;
  41. /**
  42. * The name of the item returned; this will be displayed in the search
  43. * results.
  44. * @var string
  45. * @since 7.0.0
  46. * @deprecated 20.0.0
  47. */
  48. public $name;
  49. /**
  50. * URL to the application item.
  51. * @var string
  52. * @since 7.0.0
  53. * @deprecated 20.0.0
  54. */
  55. public $link;
  56. /**
  57. * The type of search result returned; for consistency, name this the same
  58. * as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
  59. * @var string
  60. * @since 7.0.0
  61. * @deprecated 20.0.0
  62. */
  63. public $type = 'generic';
  64. /**
  65. * Create a new search result
  66. * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]'
  67. * @param string $name displayed text of result
  68. * @param string $link URL to the result within its app
  69. * @since 7.0.0
  70. * @deprecated 20.0.0
  71. */
  72. public function __construct($id = null, $name = null, $link = null) {
  73. $this->id = $id;
  74. $this->name = $name;
  75. $this->link = $link;
  76. }
  77. }