1<?php
2
3/**
4 * This file is part of the FreeDSx LDAP package.
5 *
6 * (c) Chad Sikorra <Chad.Sikorra@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace FreeDSx\Ldap\Search\Filter;
13
14/**
15 * An interface used for filters that contain other filters.
16 *
17 * @author Chad Sikorra <Chad.Sikorra@gmail.com>
18 */
19interface FilterContainerInterface extends FilterInterface
20{
21    /**
22     * Add a filter.
23     *
24     * @param FilterInterface ...$filters
25     * @return $this
26     */
27    public function add(FilterInterface ...$filters);
28
29    /**
30     * Get the filters.
31     *
32     * @return FilterInterface[]|FilterContainerInterface[]
33     */
34    public function get(): array;
35
36    /**
37     * Check if a filter exists.
38     *
39     * @param FilterInterface $filter
40     * @return bool
41     */
42    public function has(FilterInterface $filter): bool;
43
44    /**
45     * Remove a specific filter.
46     *
47     * @param FilterInterface ...$filters
48     * @return $this
49     */
50    public function remove(FilterInterface ...$filters);
51
52    /**
53     * Set the filters.
54     *
55     * @param FilterInterface ...$filters
56     * @return $this
57     */
58    public function set(FilterInterface ...$filters);
59}
60