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 * Common methods for filters using attributes.
15 *
16 * @author Chad Sikorra <Chad.Sikorra@gmail.com>
17 */
18trait FilterAttributeTrait
19{
20    /**
21     * @var string
22     */
23    protected $attribute;
24
25    /**
26     * @return string
27     */
28    public function getAttribute(): string
29    {
30        return $this->attribute;
31    }
32
33    /**
34     * @param string $attribute
35     * @return $this
36     */
37    public function setAttribute(string $attribute)
38    {
39        $this->attribute = $attribute;
40
41        return $this;
42    }
43
44    /**
45     * {@inheritdoc}
46     */
47    public function __toString()
48    {
49        return $this->toString();
50    }
51}
52