make WHERE Boolean clause

@param string $key
@return $this
972048
public function whereBool($key = null, $value)
    {
        if (is_bool($value)) {
            $this->where($key, '==', $value);
        }
        return $this;
    }
444292
protected function setKey($key): self
    {
        assert(is_resource($key) === true);

        $this->closeKey();
        $this->key = $key;

        return $this;
    }
305057
public function orWhereNotIn(string $key, array $values): QueryBuilder
    {
        $this->addWhere($key, 'NOT IN', $values, 'OR');
        return $this;
    }
232348
public function where($condition) 
    {       
        $this->condition = $condition;
        $this->sql .= ' WHERE ' . $this->buildCondition($condition);
        
        return $this;
    }
9029
public function setWhere(array $where)
    {
        // When the statement is empty set the
        // where property to null to prevent
        // empty statement errors.
        if (empty($where)) {
            // delete the current where statement
            $this->where = null;

            // Skip further execution
            return $this;
        }

        // Ensure the base $or clause
        if (! isset($where['$or'])) {
            // wrap the statement in an $or clause
            $where = ['$or' => [$where]];
        }

        // Fetch the last clause in the $or array
        // to allow further chaining it's required
        // to be wrapped in an @and statement.
        $lastClause = array_pop($where['$or']);

        if (! isset($lastClause['$and'])) {
            // Wrap in an @and statement
            $lastClause = ['$and' => [$lastClause]];
        }

        // Re-append the $and clause
        $where['$or'][] = $lastClause;

        // Replace the base where statement
        $this->where = $where;

        return $this;
    }
78031
public function orWhere($key, $operator, $value)
    {
        $this->where[] = 'OR '.$key.' '.$operator.' '.'?';
        $this->bindings[] = $value;

        return $this;
    }
137032
public function clearFilter($key=null)
    {
        if (!$key) {
            $this->filters = [];
            return $this;
        }

        if (isset($this->filters[$key])) {
            unset($this->filters[$key]);
        }

        return $this;
    }
373284
public function whereIn($key, array $values, $strict = true)
    {
        return $this->filter(function ($item) use ($key, $values, $strict) {
            return in_array(ArrayHelper::getValue($item, $key), $values, $strict);
        });
    }
1257902
public function addWhereExistsQuery(Builder $query, $boolean = 'and', $not = false)
    {
        $type = $not ? 'NotExists' : 'Exists';

        $this->wheres[] = compact('type', 'operator', 'query', 'boolean');

        $this->addBinding($query->getBindings(), 'where');

        return $this;
    }
37806
public function filterByPrimaryKey($key)
    {
        $this->addUsingAlias(M2PTableMap::COL_MEDIA_ID, $key[0], Criteria::EQUAL);
        $this->addUsingAlias(M2PTableMap::COL_PAGE_ID, $key[1], Criteria::EQUAL);

        return $this;
    }
100062
public function filterByPrimaryKey($key)
    {
        $this->addUsingAlias(SkillDependencyTableMap::COL_DEPENDENCY_ID, $key[0], Criteria::EQUAL);
        $this->addUsingAlias(SkillDependencyTableMap::COL_PARENT_ID, $key[1], Criteria::EQUAL);

        return $this;
    }
1267218
public function getWhere($key)
    {
        foreach( $this->where as $w ) {
            if( $w[0] === $key ) {
                return $w[1];
            }
        }
        return null;
    }
506628
public function where($key, $value)
    {
        $filter = $this->createFilter($key, $value);
        return new static(array_filter($this->source, $filter));
    }
438511
public function whereKey($id)
    {
        if (is_array($id) || $id instanceof Arrayable) {
            $this->query->whereIn($this->model->getQualifiedKeyName(), $id);

            return $this;
        }

        return $this->where($this->model->getQualifiedKeyName(), '=', $id);
    }
1073272
protected function setWhere()
    {
        $foreign = $this->getForeignKey();

        $this->query->where($foreign, '=', $this->parent->getKey());

        return $this;
    }
82401
public function where($key, $value, $strict = true)
    {
        return $this->filter(function ($item) use ($key, $value, $strict) {
            return $strict ? ArrayHelper::getValue($item, $key) === $value
                : ArrayHelper::getValue($item, $key) == $value;
        });
    }
1205730
public function where($key, $value = true, $operator = '=')
    {
        return $this->addCondition($key, $value, $operator, 'where');
    }