src/LdapTools/Query/OperatorCollection.php
public function add(BaseOperator ...$operators)
    {
        foreach ($operators as $operator) {
            if ($operator instanceof bAnd) {
                $this->operators['and'][] = $operator;
            } elseif ($operator instanceof bOr) {
                $this->operators['or'][] = $operator;
            } elseif ($operator instanceof bNot) {
                $this->operators['not'][] = $operator;
            } elseif ($operator instanceof Wildcard) {
                $this->operators['wildcard'][] = $operator;
            } elseif ($operator instanceof MatchingRule) {
                $this->operators['matchingrule'][] = $operator;
            } elseif ($operator instanceof Comparison) {
                $this->operators['comparison'][] = $operator;
            } else {
                throw new InvalidArgumentException('Unknown operator type.');
            }
        }
        
        return $this;
    }
public function add(BaseOperator ...$operators)
    {
        foreach ($operators as $operator) {
            if ($operator instanceof bAnd) {
                $this->operators['and'][] = $operator;
            } elseif ($operator instanceof bOr) {
                $this->operators['or'][] = $operator;
            } elseif ($operator instanceof bNot) {
                $this->operators['not'][] = $operator;
            } elseif ($operator instanceof Wildcard) {
                $this->operators['wildcard'][] = $operator;
            } elseif ($operator instanceof MatchingRule) {
                $this->operators['matchingrule'][] = $operator;
            } elseif ($operator instanceof Comparison) {
                $this->operators['comparison'][] = $operator;
            } else {
                throw new InvalidArgumentException('Unknown operator type.');
            }
        }
        
        return $this;
    }
public function add ( BaseOperator ... $ operators ) { foreach ( $ operators as $ operator ) { if ( $ operator instanceof bAnd ) { $ this -> operators [ 'and' ] [ ] = $ operator ; } elseif ( $ operator instanceof bOr ) { $ this -> operators [ 'or' ] [ ] = $ operator ; } elseif ( $ operator instanceof bNot ) { $ this -> operators [ 'not' ] [ ] = $ operator ; } elseif ( $ operator instanceof Wildcard ) { $ this -> operators [ 'wildcard' ] [ ] = $ operator ; } elseif ( $ operator instanceof MatchingRule ) { $ this -> operators [ 'matchingrule' ] [ ] = $ operator ; } elseif ( $ operator instanceof Comparison ) { $ this -> operators [ 'comparison' ] [ ] = $ operator ; } else { throw new InvalidArgumentException ( 'Unknown operator type.' ) ; } } return $ this ; }
Add an Operator to the collection.

@param BaseOperator[] ...$operators
@return $this
@throws LdapQueryException
Add an Operator to the collection .