2011-07-29 15:03:53 -04:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2011-07-29 15:03:53 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2011-07-29 15:03:53 -04:00
|
|
|
*/
|
2014-06-05 19:17:02 -04:00
|
|
|
namespace OCP\Search;
|
2013-08-22 23:04:06 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The generic result of a search
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 7.0.0
|
2020-06-22 04:57:40 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-22 23:04:06 -04:00
|
|
|
*/
|
2014-02-17 20:57:27 -05:00
|
|
|
class Result {
|
2013-08-26 08:12:06 -04:00
|
|
|
/**
|
|
|
|
|
* A unique identifier for the result, usually given as the item ID in its
|
|
|
|
|
* corresponding application.
|
|
|
|
|
* @var string
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 7.0.0
|
2020-06-22 04:57:40 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-26 08:12:06 -04:00
|
|
|
*/
|
|
|
|
|
public $id;
|
2013-08-22 23:04:06 -04:00
|
|
|
|
2013-08-26 08:12:06 -04:00
|
|
|
/**
|
|
|
|
|
* The name of the item returned; this will be displayed in the search
|
|
|
|
|
* results.
|
|
|
|
|
* @var string
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 7.0.0
|
2020-06-22 04:57:40 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-26 08:12:06 -04:00
|
|
|
*/
|
|
|
|
|
public $name;
|
2013-08-22 23:04:06 -04:00
|
|
|
|
2013-08-26 08:12:06 -04:00
|
|
|
/**
|
|
|
|
|
* URL to the application item.
|
|
|
|
|
* @var string
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 7.0.0
|
2020-06-22 04:57:40 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-26 08:12:06 -04:00
|
|
|
*/
|
|
|
|
|
public $link;
|
2013-08-22 23:04:06 -04:00
|
|
|
|
2013-08-26 08:12:06 -04:00
|
|
|
/**
|
|
|
|
|
* The type of search result returned; for consistency, name this the same
|
2020-04-09 10:09:23 -04:00
|
|
|
* as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
|
2013-08-26 08:12:06 -04:00
|
|
|
* @var string
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 7.0.0
|
2020-06-22 04:57:40 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-26 08:12:06 -04:00
|
|
|
*/
|
|
|
|
|
public $type = 'generic';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new search result
|
|
|
|
|
* @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]'
|
|
|
|
|
* @param string $name displayed text of result
|
|
|
|
|
* @param string $link URL to the result within its app
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 7.0.0
|
2020-06-22 04:57:40 -04:00
|
|
|
* @deprecated 20.0.0
|
2013-08-26 08:12:06 -04:00
|
|
|
*/
|
|
|
|
|
public function __construct($id = null, $name = null, $link = null) {
|
|
|
|
|
$this->id = $id;
|
|
|
|
|
$this->name = $name;
|
|
|
|
|
$this->link = $link;
|
|
|
|
|
}
|
2011-07-29 15:03:53 -04:00
|
|
|
}
|