public function setColumn($column, $operator = Condition::OPERATOR_OR)
    {
        $columnAlreadySet = count($this->column) > 0;
        if (!Condition::isOperator($operator) && $columnAlreadySet) {
            $msg = sprintf("Operator must be '%s' or '%s'.", Condition::OPERATOR_AND, Condition::OPERATOR_OR);
            throw new Exception($msg);
        }

        if ($columnAlreadySet) {
            $this->column[] = $operator;
            $this->column[] = $column;
        } else {
            $this->column[] = $column;
        }

        return $this;
    }
public function setColumn($column, $operator = Condition::OPERATOR_OR)
    {
        $columnAlreadySet = count($this->column) > 0;
        if (!Condition::isOperator($operator) && $columnAlreadySet) {
            $msg = sprintf("Operator must be '%s' or '%s'.", Condition::OPERATOR_AND, Condition::OPERATOR_OR);
            throw new Exception($msg);
        }

        if ($columnAlreadySet) {
            $this->column[] = $operator;
            $this->column[] = $column;
        } else {
            $this->column[] = $column;
        }

        return $this;
    }
public function setColumn ( $ column , $ operator = Condition :: OPERATOR_OR ) { $ columnAlreadySet = count ( $ this -> column ) > 0 ; if ( ! Condition :: isOperator ( $ operator ) && $ columnAlreadySet ) { $ msg = sprintf ( "Operator must be '%s' or '%s'." , Condition :: OPERATOR_AND , Condition :: OPERATOR_OR ) ; throw new Exception ( $ msg ) ; } if ( $ columnAlreadySet ) { $ this -> column [ ] = $ operator ; $ this -> column [ ] = $ column ; } else { $ this -> column [ ] = $ column ; } return $ this ; }
Map to database column.
@param string $column
@param string $operator
@return Filter
@throws Exception
Map to database column .