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