src/Charcoal/Source/Filter.php
public function setOperator($operator)
    {
        if (!is_string($operator)) {
            throw new InvalidArgumentException(
                'Operator should be a string.'
            );
        }

        $operator = strtoupper($operator);
        if (!in_array($operator, $this->validOperators())) {
            throw new InvalidArgumentException(sprintf(
                'Comparison operator "%s" not allowed in this context.',
                $operator
            ));
        }

        $this->operator = $operator;
        return $this;
    }
public function setOperator($operator)
    {
        if (!is_string($operator)) {
            throw new InvalidArgumentException(
                'Operator should be a string.'
            );
        }

        $operator = strtoupper($operator);
        if (!in_array($operator, $this->validOperators())) {
            throw new InvalidArgumentException(sprintf(
                'Comparison operator "%s" not allowed in this context.',
                $operator
            ));
        }

        $this->operator = $operator;
        return $this;
    }
public function setOperator ( $ operator ) { if ( ! is_string ( $ operator ) ) { throw new InvalidArgumentException ( 'Operator should be a string.' ) ; } $ operator = strtoupper ( $ operator ) ; if ( ! in_array ( $ operator , $ this -> validOperators ( ) ) ) { throw new InvalidArgumentException ( sprintf ( 'Comparison operator "%s" not allowed in this context.' , $ operator ) ) ; } $ this -> operator = $ operator ; return $ this ; }
Set the operator used for comparing field and value.

@param  string $operator The comparison operator.
@throws InvalidArgumentException If the parameter is not a valid operator.
@return self
Set the operator used for comparing field and value .