Sets the conditions.

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

        return $this;
    }
783966
public function get($conditions)
    {
        $query = $this->db->getQuery(true);

        $query->select('*')
            ->from($query->quoteName($this->table))
            ->where('id = :id')
            ->bind('id', $conditions);

        return $this->db->setQuery($query)->loadOne('assoc');
    }
1250094
public function orHaving(...$conditions) : self
    {
        $this->havingConditions = $this->conditionalQueryBuilder->addConditionToClause(
            $this->havingConditions, 'OR', ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
1000627
public function where(...$conditions) : self
    {
        $this->conditionalQueryBuilder->where(
            ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
296692
public function setRules( array $rules )
	{
		$this->initialRules = $rules;

		$this->rules = [];

		$rules = $this->explodeRules( $this->initialRules );

		$this->rules = array_merge( $this->rules, $rules );

		return $this;
	}
144201
public function autoNullConditionsArray(array $conditions) {
		foreach ($conditions as $k => $v) {
			if ($v !== null) {
				continue;
			}

			$conditions[$k . ' IS'] = $v;
			unset($conditions[$k]);
		}

		return $conditions;
	}
695671
public function update($values, $conditions, $params = array()){
        return $this->db->builder()->update($this->table, $values, $conditions, $params);
    }
746955
public function addConditionsFromArray(array $conditions)
    {
        foreach ($conditions as $condition) {

            if (!is_callable($condition)) {

                $message = "One or more of the conditions you provided are not callable, ";
                $message .= "please pass an array of callable functions.";

                throw new \InvalidArgumentException($message);
            }

            $this->conditions->enqueue($condition);

        }
    }
1233318
public function having($conditions, $params = array())
    {
        $this->mergeParams($params);
        $this->query['having'] = $this->buildConditions($conditions);

        return $this;
    }
806668
public function having($conditions, $parameters = [])
	{
		$this->having = [];

		if (!empty($conditions)) {
			$this->addHaving($conditions, $parameters);
		}

		return $this;
	}
274005
public function orWhere(...$conditions) : self
    {
        $this->conditionalQueryBuilder->orWhere(
            ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
1364581
public function Where($condition, $values) {
        $this->setWhere($condition);
        $this->addBindValues($values);
        return $this;
    }
935452
public function addCondition(ConditionAbstract $condition)
    {
        if ($condition instanceof SupportsCondition) {
            $this->conditions[] = $condition;
        } else {
            throw new \InvalidArgumentException(
                "Invalid condition instance. Instance of 'SupportsCondition' expected."
            );
        }

        return $this;
    }
1367369
public function having(...$conditions) : self
    {
        // We want to wipe out anything already in the condition list
        $this->havingConditions = [];
        $this->havingConditions = $this->conditionalQueryBuilder->addConditionToClause(
            $this->havingConditions, 'AND', ...$this->createConditionExpressions($conditions)
        );

        return $this;
    }
1301460
public function where($condition, $parameters = [])
	{
		$this->emptyResult();

		$this->queryBuilder->addWhere($condition, $parameters);
		return $this;
	}
1120857
public function setCondition($condition)
    {
        $this->condition = (string) $condition;
        $this->compiled = null;

        return $this;
    }
20472
public function whereGroup($conditions, $logic = 'AND')
    {
        $whereGroup = $this->_append('Where_Group', $conditions, $logic);
        if ($group = $whereGroup->__toString()) {
            $this->where('(' . $group . ')', null, $logic);
        }

        return $this;
    }