aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Search/IFilterCollection.php
blob: 45e5e196d7f6981bb6613c9567e63e51bb86afa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

declare(strict_types=1);
/**
 * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCP\Search;

use IteratorAggregate;

/**
 * Interface for search filters
 *
 * @since 28.0.0
 * @extends IteratorAggregate<string, \OCP\Search\IFilter>
 */
interface IFilterCollection extends IteratorAggregate {
	/**
	 * Check if a filter exits
	 *
	 * @since 28.0.0
	 */
	public function has(string $name): bool;

	/**
	 * Get a filter by name
	 *
	 * @since 28.0.0
	 */
	public function get(string $name): ?IFilter;

	/**
	 * Return Iterator of filters
	 *
	 * @since 28.0.0
	 */
	public function getIterator(): \Traversable;
}