diff options
Diffstat (limited to 'lib/public/Search')
-rw-r--r-- | lib/public/Search/FilterDefinition.php | 2 | ||||
-rw-r--r-- | lib/public/Search/IExternalProvider.php | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/lib/public/Search/FilterDefinition.php b/lib/public/Search/FilterDefinition.php index 1f43222752d..86b2bb655ff 100644 --- a/lib/public/Search/FilterDefinition.php +++ b/lib/public/Search/FilterDefinition.php @@ -67,7 +67,7 @@ class FilterDefinition { * * @param self::TYPE_* $type * @param bool $exclusive If true, all providers not supporting this filter will be ignored when this filter is provided - * @throw InvalidArgumentException in case of invalid name. Allowed characters are -, 0-9, a-z. + * @throws InvalidArgumentException in case of invalid name. Allowed characters are -, 0-9, a-z. * @since 28.0.0 */ public function __construct( diff --git a/lib/public/Search/IExternalProvider.php b/lib/public/Search/IExternalProvider.php new file mode 100644 index 00000000000..a9a8e3ad6ba --- /dev/null +++ b/lib/public/Search/IExternalProvider.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Search; + +/** + * Interface for search providers that forward user queries to external services. + * + * @since 32.0.0 + */ +interface IExternalProvider extends IProvider { + /** + * Indicates whether this search provider queries external (3rd-party) resources. + * This is used by the Unified Search modal filter (toggle switch). By default, searching through external providers is disabled. + * + * @return bool default false + * + * @since 32.0.0 + */ + public function isExternalProvider(): bool; +} |