Set

@param   string  $condition
962531
public function set($condition, array $params = [])
    {
        $this->conditions = [];
        $this->add($condition, $params);
        return $this;
    }
1248454
public function merge(Condition $condition)
    {
        $this->expressions = array_merge($this->expressions, $condition->toArray());

        return $this;
    }
262423
private function addCondition($property, $condition)
    {
        $currentCondition = $property->getVisibleCondition();
        if ((!($currentCondition instanceof ConditionChainInterface))
            || ($currentCondition->getConjunction() != ConditionChainInterface::OR_CONJUNCTION)
        ) {
            if ($currentCondition === null) {
                $currentCondition = new PropertyConditionChain([$condition]);
            } else {
                $currentCondition = new PropertyConditionChain([$currentCondition, $condition]);
            }
            $currentCondition->setConjunction(ConditionChainInterface::OR_CONJUNCTION);
            $property->setVisibleCondition($currentCondition);
        } else {
            $currentCondition->addCondition($condition);
        }
    }
784720
public function setValue($value)
    {
        if ($this->value instanceof Binding && !($value instanceof Binding)) {
            $this->value->setValue($value);
        } else {
            $this->value = $value;
        }
    }
1277945
protected function setConditions($conditions = [])
    {
        if ($conditions instanceof Closure || is_array($conditions)) {
            $this->conditions = $conditions;
        } else {
            $this->conditions = [$conditions];
        }
    }
44494
protected function parseCondition($condition)
    {
        $tableAlias = $this->getAlias();
        $parts = [];

        if ($condition instanceof QueryBuilderAwareInterface) {
            $condition->setQueryBuilder($this);
        }

        if ($condition instanceof Expression) {
            $parts[] = $this->getAdapter()->quoteSql($condition->toSQL());
        } elseif ($condition instanceof Q) {
            $condition->setLookupBuilder($this->getLookupBuilder());
            $condition->setAdapter($this->getAdapter());
            $condition->setTableAlias($tableAlias);
            $parts[] = $condition->toSQL();
        } elseif ($condition instanceof ToSqlInterface) {
            $parts[] = $condition->toSQL();
        } elseif (is_array($condition)) {
            foreach ($condition as $key => $value) {
                if ($value instanceof Q) {
                    $parts[] = $this->parseCondition($value);
                } else {
                    list($lookup, $column, $lookupValue) = $this->lookupBuilder->parseLookup($this, $key, $value);
                    $column = $this->getLookupBuilder()->fetchColumnName($column);
                    if (false === empty($tableAlias) && false === strpos($column, '.')) {
                        $column = $tableAlias.'.'.$column;
                    }
                    $parts[] = $this->lookupBuilder->runLookup($this->getAdapter(), $lookup, $column, $lookupValue);
                }
            }
        } elseif (is_string($condition)) {
            $parts[] = $condition;
        } elseif ($condition instanceof Expression) {
            $parts[] = $condition->toSQL();
        }

        if (1 === count($parts)) {
            return $parts[0];
        }

        return '('.implode(') AND (', $parts).')';
    }
993721
public static function basedOn($condition): self
    {
        $name = $condition instanceof Condition ? $condition->name() : $condition;

        return new self($name, '');
    }
910803
public function where(string $condition = '', array $params = []) {
        if ($condition) {
            $this->sql .= " WHERE $condition ";
            $this->params = array_merge($this->params, $params);
        }
        return $this;
    }
1273952
public function addConditions( $conditions )
	{
		if( !is_array( $conditions ) )
			throw new InvalidArgumentException( 'An Array should be given.' );
		foreach( $conditions as $condition )
			$this->addCondition( $condition );
	}
979377
public function filterOne(array $condition)
	{
		foreach ($this->data as $item) {
			foreach ($condition as $key => $value) {
				if ($item[$key] == $value) {
					$this->setData([$item]);

					return $this;
				}
			}
		}

		$this->setData([]);

		return $this;
	}
278198
protected function applyRootCondition(&$condition)
    {
        if (false !== $this->rootAttribute) {
            $condition[] = [$this->rootAttribute => $this->node->{$this->rootAttribute}];
        }
    }
944464
public function setLength(array $condition)
    {
        if (is_array($condition) === true)  {
            $this->{key($condition)} = (int) current($condition);
        }

        return $this;
    }
600065
public function filter($condition)
    {
        $items = $this->find()->where($condition)->all();
        $this->_filter = $this->_getTreeNodesIds($items);
    }
561945
public function removeCondition($condition)
    {
        if ($this->conditions->contains($condition)) {
            $this->conditions->removeElement($condition);
        }

        return $this;
    }
1302685
public function set_condition($conditionparam, $conditionvalue) {
        // We only resolve the condition if the parent of the element (optigroup) already has parent
        // else, we'll resolve it once the optigroup parent is defined
        if ($this->get_parent() && $this->get_parent()->get_parent() && $conditionparam !== null) {
            $this->procconditionparam = $this->find_element($conditionparam);
        }
        $this->conditionparam = $conditionparam;
        $this->conditionvalue = $conditionvalue;
    }
1301460
public function where($condition, $parameters = [])
	{
		$this->emptyResult();

		$this->queryBuilder->addWhere($condition, $parameters);
		return $this;
	}
763147
public static function create($condition): self
    {
        $condition = $condition instanceof Condition ? $condition : Condition::fromValue($condition);

        return new self($condition);
    }