summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-06-22 10:57:40 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-06-24 14:20:26 +0200
commit27b8637e3e2676e81df74891043c39530bdc1cda (patch)
tree94087564729209c20b07832a956431763d801ebf /lib/public
parentf8e08a74bac4b065edcade762e2ca3632ff76797 (diff)
downloadnextcloud-server-27b8637e3e2676e81df74891043c39530bdc1cda.tar.gz
nextcloud-server-27b8637e3e2676e81df74891043c39530bdc1cda.zip
Deprecate \OCP\ISearch
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/ISearch.php5
-rw-r--r--lib/public/IServerContainer.php1
-rw-r--r--lib/public/Search/PagedProvider.php5
-rw-r--r--lib/public/Search/Provider.php7
-rw-r--r--lib/public/Search/Result.php6
5 files changed, 24 insertions, 0 deletions
diff --git a/lib/public/ISearch.php b/lib/public/ISearch.php
index 747b598e669..94338b3d20d 100644
--- a/lib/public/ISearch.php
+++ b/lib/public/ISearch.php
@@ -29,6 +29,7 @@ namespace OCP;
/**
* Small Interface for Search
* @since 7.0.0
+ * @deprecated 20.0.0
*/
interface ISearch {
@@ -40,6 +41,7 @@ interface ISearch {
* @param int $size
* @return array An array of OCP\Search\Result's
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public function searchPaged($query, array $inApps = [], $page = 1, $size = 30);
@@ -48,6 +50,7 @@ interface ISearch {
* @param string $class class name of a OCP\Search\Provider
* @param array $options optional
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public function registerProvider($class, array $options = []);
@@ -55,12 +58,14 @@ interface ISearch {
* Remove one existing search provider
* @param string $provider class name of a OCP\Search\Provider
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public function removeProvider($provider);
/**
* Remove all registered search providers
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public function clearProviders();
}
diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php
index 45f2a1caf4e..f5a644bee04 100644
--- a/lib/public/IServerContainer.php
+++ b/lib/public/IServerContainer.php
@@ -359,6 +359,7 @@ interface IServerContainer extends IContainer {
*
* @return \OCP\ISearch
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public function getSearch();
diff --git a/lib/public/Search/PagedProvider.php b/lib/public/Search/PagedProvider.php
index cbccc1abc0f..479214ad405 100644
--- a/lib/public/Search/PagedProvider.php
+++ b/lib/public/Search/PagedProvider.php
@@ -30,12 +30,14 @@ namespace OCP\Search;
/**
* Provides a template for search functionality throughout ownCloud;
* @since 8.0.0
+ * @deprecated 20.0.0
*/
abstract class PagedProvider extends Provider {
/**
* show all results
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public const SIZE_ALL = 0;
@@ -43,6 +45,7 @@ abstract class PagedProvider extends Provider {
* Constructor
* @param array $options
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public function __construct($options) {
parent::__construct($options);
@@ -53,6 +56,7 @@ abstract class PagedProvider extends Provider {
* @param string $query
* @return array An array of OCP\Search\Result's
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public function search($query) {
// old apps might assume they get all results, so we use SIZE_ALL
@@ -66,6 +70,7 @@ abstract class PagedProvider extends Provider {
* @param int $size 0 = SIZE_ALL
* @return array An array of OCP\Search\Result's
* @since 8.0.0
+ * @deprecated 20.0.0
*/
abstract public function searchPaged($query, $page, $size);
}
diff --git a/lib/public/Search/Provider.php b/lib/public/Search/Provider.php
index 18594eefb8f..275a63c0056 100644
--- a/lib/public/Search/Provider.php
+++ b/lib/public/Search/Provider.php
@@ -30,11 +30,13 @@ namespace OCP\Search;
/**
* Provides a template for search functionality throughout ownCloud;
* @since 7.0.0
+ * @deprecated 20.0.0
*/
abstract class Provider {
/**
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public const OPTION_APPS = 'apps';
@@ -42,6 +44,7 @@ abstract class Provider {
* List of options
* @var array
* @since 7.0.0
+ * @deprecated 20.0.0
*/
protected $options;
@@ -49,6 +52,7 @@ abstract class Provider {
* Constructor
* @param array $options as key => value
* @since 7.0.0 - default value for $options was added in 8.0.0
+ * @deprecated 20.0.0
*/
public function __construct($options = []) {
$this->options = $options;
@@ -59,6 +63,7 @@ abstract class Provider {
* @param string $key
* @return mixed
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public function getOption($key) {
if (is_array($this->options) && isset($this->options[$key])) {
@@ -76,6 +81,7 @@ abstract class Provider {
* @param string[] $apps
* @return bool
* @since 8.0.0
+ * @deprecated 20.0.0
*/
public function providesResultsFor(array $apps = []) {
$forApps = $this->getOption(self::OPTION_APPS);
@@ -87,6 +93,7 @@ abstract class Provider {
* @param string $query
* @return array An array of OCP\Search\Result's
* @since 7.0.0
+ * @deprecated 20.0.0
*/
abstract public function search($query);
}
diff --git a/lib/public/Search/Result.php b/lib/public/Search/Result.php
index 33748cff375..a3a58a38cde 100644
--- a/lib/public/Search/Result.php
+++ b/lib/public/Search/Result.php
@@ -29,6 +29,7 @@ namespace OCP\Search;
/**
* The generic result of a search
* @since 7.0.0
+ * @deprecated 20.0.0
*/
class Result {
@@ -37,6 +38,7 @@ class Result {
* corresponding application.
* @var string
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public $id;
@@ -45,6 +47,7 @@ class Result {
* results.
* @var string
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public $name;
@@ -52,6 +55,7 @@ class Result {
* URL to the application item.
* @var string
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public $link;
@@ -60,6 +64,7 @@ class Result {
* as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
* @var string
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public $type = 'generic';
@@ -69,6 +74,7 @@ class Result {
* @param string $name displayed text of result
* @param string $link URL to the result within its app
* @since 7.0.0
+ * @deprecated 20.0.0
*/
public function __construct($id = null, $name = null, $link = null) {
$this->id = $id;