@param string[] $operators

@return FilterOperators

@throws \InvalidArgumentException
184397
public function setOperators(array $operators): self
    {
        foreach ($operators as $operator) {
            $this->validateOperator($operator);
        }
        $this->operators = $operators;

        return $this;
    }
1189315
public function getInlineOperator(string $operator): callable
    {
        if (!$this->hasInlineOperator($operator)) {
            throw new OperatorNotFoundException($operator, sprintf('Inline operator "%s" does not exist.', $operator));
        }

        return $this->inlineOperators[$operator];
    }
303604
protected function invalidOperatorAndValue($operator, $value)
    {
        return is_null($value) && array_key_exists($operator, $this->operators) &&
        ! array_key_exists($operator, ['=', '<>', '!=']);
    }
634968
public function setOperator($operator)
    {
        if (!in_array($operator, $this->_supportedOperators)) {
            $list = implode('|', $this->_supportedOperators);
            throw new InvalidArgumentException("operator has to be $list, not $operator");
        }

        if ($this->_allowedConnectives && !in_array($operator, $this->_allowedConnectives)) {
            throw new UnsupportedParameterException("This logical group only accept connectives:" . implode($this->_allowedConnectives));
        }
        $this->_operator = $operator;
        $this->_toStringSeparator = ' ' . strtoupper($operator) . ' ';
        return $this;
    }
1271931
static public function getChoices(array $operators)
    {
        $choices = [];
        foreach ($operators as $operator) {
            $choices[static::getLabel($operator)] = $operator;
        }

        return $choices;
    }
1365673
private function filtersDefaultOperators(array $filters): array
    {
        foreach ($filters as $key => $filter) {
            // give the filter default operators, according to its type
            if (
                (!array_key_exists('operators', $filter)) ||
                (empty($filter['operators']))
            ) {
                $builderType = $filter['type'];

                switch ($builderType) {
                    case 'string':
                        $filter['operators'] = [
                            'equal', 'not_equal', 'is_null', 'is_not_null',
                            'begins_with', 'not_begins_with', 'contains', 'not_contains', 'ends_with', 'not_ends_with', 'is_empty', 'is_not_empty', // specific to strings
                        ];

                        break;
                    case 'integer':
                    case 'double':
                    case 'date':
                    case 'time':
                    case 'datetime':
                        $filter['operators'] = [
                            'equal', 'not_equal', 'is_null', 'is_not_null',
                            'less', 'less_or_equal', 'greater', 'greater_or_equal', 'between', 'not_between', // specific to numbers and dates
                        ];

                        break;
                    case 'boolean':
                        $filter['operators'] = [
                            'equal', 'not_equal', 'is_null', 'is_not_null',
                        ];

                        break;
                }
            }
            $filters[$key] = $filter;
        }

        return $filters;
    }
1126196
protected function filterOrCondition(array $data, $operator, $operands)
    {
        $parts = [];
        foreach ($operands as $operand) {
            if (is_array($operand)) {
                $parts[] = $this->filterCondition($data, $operand);
            }
        }

        if (empty($parts)) {
            return $data;
        }

        $data = [];
        foreach ($parts as $part) {
            foreach ($part as $row) {
                $pk = $row[$this->_query->primaryKeyName];
                $data[$pk] = $row;
            }
        }

        return $data;
    }
638134
protected function getOperator($operator) {
         /**
          * @todo change that for a factory
          */
        if(array_key_exists($operator, $this->supportedOperators)) {
            
            $operatorClass = $this->operatorNameSpace . '\\' . ($this->supportedOperators[$operator]);
            $operator = $this->getServiceLocator()->get($operatorClass);
            $operator->setDriverEscaper($this->getDriverEscaper());
            return $operator;
        }
        throw new QueryParsingException('this driver doesn\'t support ' . $operator . ' operator');
    }
901365
private function getOperatorConfiguration(array $operators): array
    {
        $conf = [];
        foreach ($operators as $operator => $leafType) {
            $instance = $this->types->getOperator($operator, $leafType);
            $field = [
                'name' => $this->getOperatorFieldName($operator),
                'type' => $instance,
            ];

            $conf[] = $field;
        }

        return $conf;
    }
303358
private static function filterAndOr($operation, QueryBuilder $queryBuilder)
    {
        $children = $operation['children'];

        if (empty($children)) {
            return;
        }

        $whereOperation = strtolower($operation['operation']) . 'Where';

        foreach ($children as $child) {
            $queryBuilder->{$whereOperation}(static::calculateSubFilter($child, $queryBuilder));
        }
    }
1174611
public static function validate(string $operator)
    {
        if (!isset(self::$operators[$operator])) {
            throw InvalidArgumentException::format(
                'Invalid condition operator: expecting one of (%s), \'%s\' given',
                Debug::formatValues(array_keys(self::$operators)), $operator
            );
        }
    }
41767
public function setOperator($operator)
    {
        if ($operator !== null && $operator !== Query::OP_AND && $operator !== Query::OP_OR) {
            throw new \InvalidArgumentException("Operator must be Query::OP_AND or Query::OP_OR");
        }

        $this->operator = $operator;

        return $this;
    }
234361
static public function isValid($operator, $throwException = false)
    {
        $operator = intval($operator);
        if ($operator > 0 && $operator <= static::IS_NOT_NULL) {
            return true;
        }

        if ($throwException) {
            throw new InvalidArgumentException('Unexpected filter operator.');
        }

        return false;
    }
436820
private static function filterInOrNotInList($operation, QueryBuilder $queryBuilder)
    {
        $expressionMethod = lcfirst(preg_replace('/\s+/', '', ucwords(strtolower($operation['operation']))));

        return $queryBuilder
            ->expr()
            ->{$expressionMethod}($operation['property'], $operation['values']);
    }
1176490
protected function getOperator(string $operator): callable
    {
        if (!$this->hasOperator($operator)) {
            throw new OperatorNotFoundException($operator, sprintf('Operator "%s" does not exist.', $operator));
        }

        return $this->operators[$operator];
    }
433631
protected function _normalize($filters, $options = [])
    {
        foreach ($filters as $key => $filter) {
            if ($filter['options']) {
                $filter['operator'] = '=';
                $filter['attributes']['empty'] = true;
            }
            if (is_null($filter['attributes']['placeholder'])) {
                $filter['attributes']['placeholder'] = $filter['column'];
            }

            $filters[$key] = $filter;
        }

        return $filters;
    }
527882
protected function filterAndCondition(array $data, $operator, $operands)
    {
        foreach ($operands as $operand) {
            if (is_array($operand)) {
                $data = $this->filterCondition($data, $operand);
            }
        }

        return $data;
    }