Add a condition that will be applied with a logical "AND".

@param string $condition
@param mixed ...$values

@return self
426547
public function andWithString(string $condition, ...$values): self
    {
        $this->parts[] = [
            'type' => 'AND',
            'condition' => $condition,
            'values' => $values,
        ];

        return $this;
    }
1263033
public function filterOne(array $condition)
	{
		foreach ($condition as $column => $value) {
			$expr = Criteria::expr()->eq($column, $value);
			$this->criteria->andWhere($expr);
		}

		return $this;
	}
815788
public function having($condition, $value = null, $logic = 'AND')
    {
        return $this->_append('Having', array($condition, $value), $logic);
    }
1191460
public function andWhere(...$conditions) : self
    {
        $this->conditionalQueryBuilder->andWhere(
            ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
293805
public function where($conditions)
    {
        if ($conditions = is_array($conditions) && func_num_args() === 1 ? $conditions : func_get_args()) {
            $this->_parts['where'][] = $conditions;
        }
        return $this;
    }
19801
public function addCondition($attribute, $values, $operator = ComparisonOperator::EQ)
    {
        $this->conditions[$attribute] = array(
            'values' => (array) $values,
            'operator' => $operator,
        );

        return $this;
    }
993721
public static function basedOn($condition): self
    {
        $name = $condition instanceof Condition ? $condition->name() : $condition;

        return new self($name, '');
    }
594620
private function prepareCondition($condition)
    {
        if (!is_array($condition)) {
            $condition = ['in' => [$condition]];
        }

        $conditionKeys = array_keys($condition);

        if (is_integer(current($conditionKeys))) {
            $condition = ['in' => $condition];
        }

        foreach ($condition as $key => $value) {
            if (!isset($this->mappedConditions[$key]) && !in_array($key, $this->rangeConditions)) {
                throw new \LogicException("Condition {$key} is not supported.");
            }

            if (isset($this->mappedConditions[$key])) {
                $condition[$this->mappedConditions[$key]] = $value;
                unset($condition[$key]);
            }

            if (in_array($key, $this->negativeConditions)) {
                $condition['negative'] = true;
            }
        }

        return $condition;
    }
291265
public function addWhereIn(string $column, array $values)
    {
        foreach ($values as $value) {  // pour bindValue(s)
            $this->wheresIn[][2] = $value;
        }

        $this->sql['where'] .= " ".$this->logicOperator." ".$column." IN ".$this->addConditionsToSqlWhithWhereIn()." ";

        $this->logicOperator = " AND ";
    }
533657
protected function _setWhere($condition, $operation = 'AND')
    {

        if (is_string($condition)) {
            $this->where[] = [
                'condition' => $condition,
                'operation' => $operation
            ];
            return $this;
        }

        if (is_array($condition) || ($condition instanceof \Traversable)) {
            $conditions = [];
            foreach ($condition as $predicate => $param) {
                if (is_array($param) || ($param instanceof \Traversable)) {
                    //param has multiple entries
                    foreach ($param as $key => $value) {
                        if (preg_match('/:[a-z_]*/i', $key)) {
                            $this->parameters[$key] = $value;
                        } else {
                            $this->parameters[] = $value;
                        }
                    }
                } elseif (!is_numeric($predicate)) {
                    $this->parameters[] = $param;
                } else {
                    $predicate = $param;
                }
                $conditions[] = $predicate;
            }
            $this->where[] = [
                'condition' => count($conditions) > 1 ?
                        '('. implode(' AND ', $conditions) .')' :
                        $conditions[0],
                'operation' => $operation
            ];
        }
        return $this;
    }
37139
protected function addClauseCondWithBind($clause, $andor, $conditions)
    {
        $cond = array_shift($conditions);
        $cond = $this->quoteNamesIn($cond);

        $bind =& $this->{"bind_{$clause}"};
        foreach ($conditions as $value) {
            $bind[] = $value;
        }

        $clause =& $this->$clause;
        if ($clause) {
            $clause[] = "$andor $cond";
        } else {
            $clause[] = $cond;
        }
    }
1001115
public function whereExists($condition, $logic = 'AND')
    {
        if (is_string($condition)) {
            $condition = $this->raw($condition);
        }

        $this->options['where'][strtoupper($logic)][] = ['', 'EXISTS', $condition];
        return $this;
    }
907817
public function where($field, $value, $comparison = '==', $logical = 'and')
    {
        $this->conditions[] = [$field, $value, $comparison, $logical];

        return $this;
    }
68351
public function addAnd($expression, ...$expressions) : self
    {
        if (! isset($this->query['$and'])) {
            $this->query['$and'] = [];
        }

        $this->query['$and'] = array_merge(
            $this->query['$and'],
            array_map(
                static function ($expression) {
                    return $expression instanceof Expr ? $expression->getQuery() : $expression;
                },
                func_get_args()
            )
        );

        return $this;
    }
129893
public function addAnd($expression)
    {
        $this->query['$and'][] = $expression instanceof Expr ? $expression->getQuery() : $expression;
        return $this;
    }
484391
public function where($condition)
    {
        $this->where = ! $this->where ? $condition : $this->where . ' AND ' . $condition;

        return $this;
    }
502827
public function setConditions($conditions)
    {
        $this->conditions = [];
        if (!is_array($conditions)) {
            $conditions = [$conditions];
        }
        foreach ($conditions as $condition) {
            $this->addCondition($condition);
        }

        return $this;
    }