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