Adds a class filter to the composite

@param string $operator The operator for this filter
@param PointcutFilterInterface $filter A configured class filter
@return void
490964
public function addFilter($operator, PointcutFilterInterface $filter): void
    {
        $this->filters[] = [$operator, $filter];
        if ($operator !== '&&' && $operator !== '&&!') {
            $this->earlyReturn = false;
        }
    }
619738
public function AddFilter(CriteriaFilter $filter)
	{
		if (!$this->Filters) $this->Filters = array();
		$this->Filters[] = $filter;
	}
412883
public function add_filter_by_key( FilterInterface $filter, $key ) {

		if ( ! is_scalar( $key ) ) {
			throw new Exception\InvalidArgumentException( 'key should be a scalar value.' );
		}

		$key = (string) $key;

		if ( ! isset ( $this->filters_by_key[ $key ] ) ) {
			$this->filters_by_key[ $key ] = [ ];
		}

		$this->filters_by_key[ $key ][] = $filter;

		return $this;
	}
457809
protected function replaceOperatorForNulLValue(OperatorInterface $Operator, $value)
    {
        if ($value === null) {
            if ($Operator->getType() === Equal::TYPE_NAME) {
                $className = CriteriaBuilder::getOperatorClassNameBySqlOperator(Is::TYPE_AS_SQL);
                $Operator = $this->getFactoryWorker()->buildCriteriaOperator($className);
            } elseif ($Operator->getType() === NotEqual::TYPE_NAME) {
                $className = CriteriaBuilder::getOperatorClassNameBySqlOperator(NotIs::TYPE_AS_SQL);
                $Operator = $this->getFactoryWorker()->buildCriteriaOperator($className);
            }
        }

        return $Operator;
    }
1172502
private void add(ConstructorFilter filter) {
        switch(operator) {
        case NOT:
            filters.add(new NegationConstructorFilter(filter));
            operator = Operator.NONE;
            break;
        case OR:
            filters.set(filters.size() - 1, 
                        new OrConstructorFilter(filters.get(filters.size() - 1), filter));
            operator = Operator.NONE;
            break;
        default:
            filters.add(filter);
            break;
        }
    }
1249145
private void decideTypeFilterToAdd(Filter filter) {
        Filter step = filter;

        if (Operator.MATCH == step.getRelation().getOperator() ||
                step.getRelation().getRightTerm() instanceof FunctionSelector) {
            if (matchList.isEmpty()) {
                matchList = new ArrayList<>();
            }
            matchList.add(filter);
        } else {
            if (filterList.isEmpty()) {
                filterList = new ArrayList<>();
            }
            filterList.add(filter);
        }
    }
1044714
private static function determineFilterAndOr(array $filter, QueryBuilder $queryBuilder)
    {
        if (!\in_array($filter['operation'], ['AND', 'OR'])) {
            return null;
        }

        static::filterAndOr($filter, $queryBuilder);

        return '';
    }
575961
public function setFilter($filter)
    {
        parent::setFilter($filter);

        $this->userOptions['value'] = $this->getOption('value') === '' ? null : $this->getOption('value');
    }
49453
public function withFilter(Filter $filter)
    {
        if ($this->value->isNull()) {
            return null;
        }

        return $this->applyFilter($filter);
    }
18397
public function filter(ODataQueryFilterInterface $filter = NULL) {
        if (isset($filter)) {
            $this->setFilter($filter);
            return $this;
        }
        return $this->getFilter();
    }
806718
public function insert($filter, $priority)
	{
		if ( ! $filter instanceof FilterInterface)
		{
			throw new \InvalidArgumentException('The filter must be an instance of FilterInterface.');
		}
		
		if ($filter instanceof FilterChainInterface)
		{
			parent::insert($filter, [-$priority, $this->serial--]);
		}
		else
		{
			if ($this->isEmpty())
			{
				parent::insert(new FilterChain(), [0, $this->serial--]);
			}
			
			$this->top()->addFilter($filter, $priority);
		}
		
		return $this;
	}
917071
public void addFilter(String filter) {

        if (CmsStringUtil.isNotEmpty(filter)) {
            filter = filter.trim().toLowerCase();
            if (FILTERS.contains(filter)) {
                m_filters.add(filter);
            }
        }
    }
18969
public function addFilter($filter)
    {
        if (!($filter instanceof FilterInterface) && !is_callable($filter)) {
            $filter = FilterHelper::create($filter);
        }

        $this->filter->addFilter($filter);

        return $this;
    }
341118
public function applyFilter($qb, FilterInterface $filter, QueryObjectInterface $queryObject)
    {
        if ($queryObject instanceof FilterableQueryObjectInterface) {
            $filterMap = $queryObject->getFilterMap();

            /* @var $filterRule FilterRule */
            foreach ($filter as $filterRule) {
                // rule must be bound
                if (!$filterRule->isBound()) {
                    continue;
                }

                // rule must be present in the filter map
                if (!isset($filterMap[$filterRule->getName()])) {
                    throw new \InvalidArgumentException(\sprintf(
                        'Column "%s" is not present in the filter map',
                        $filterRule->getName()
                    ));
                }

                $this->filterRuleProcessor->process($qb, $filterRule, $filterMap[$filterRule->getName()]);
            }
        }
    }
757573
private function sub($conjunction, FilterInterface $filter)
    {
        if (!empty($this->expression)) {
            $this->expression[] = $conjunction;
        }

        $index              = \count($this->variables);
        $this->expression[] = \sprintf(self::SUB_FILTER, $index);
        $this->variables[]  = $filter;
        $this->compiled     = null;

        return $this;
    }
378911
public function addFilter($field, $value, $operator = null)
    {
        $this->filters[$field] = $value;

        return $this;
    }
710142
public function reflect(FilterInterface $filter = null)
    {
        $exprParts = array();

        /**
         * @var $rule \IMT\DataGrid\Filter\RuleInterface
         */
        foreach ($filter->getRules() as $rule) {
            $ruleReflectionClass = sprintf(
                '%s\Rule\%sRuleReflection',
                __NAMESPACE__,
                ucfirst($rule->getOperator())
            );

            if (!class_exists($ruleReflectionClass)) {
                throw new ReflectionNotFoundException(
                    sprintf(
                        'The data grid filter rule reflection class named `%s` '
                        . 'does not exist.',
                        $ruleReflectionClass
                    )
                );
            }

            /**
             * @var $ruleReflection ReflectionInterface
             */
            $ruleReflection = new $ruleReflectionClass($this->queryBuilder);

            $exprParts[] = $ruleReflection->reflect($rule);
        }

        $exprOperation = mb_strtolower($filter->getOperator()) . 'X';
        $expr = call_user_func_array(
            array($this->queryBuilder->expr(), $exprOperation),
            $exprParts
        );

        $nestedExprParts = array();

        foreach ($filter->getFilters() as $nestedFilter) {
            $nestedExprParts[] = $this->reflect($nestedFilter);
        }

        if (count($nestedExprParts) == 0) {
            return $expr;
        }

        return call_user_func_array(
            array($this->queryBuilder->expr(), 'andX'),
            array_merge(array($expr), $nestedExprParts)
        );
    }