Aplica filtros em $this->queryBuilder.

@param array $filters

@return QueryWorker
500263
public function withFilters(array $filters = null)
    {
        if ($filters) {
            foreach ($filters as $filter) {
                switch ($filter['type']) {
                    case 'select':
                        $this->select($filter['fields']);
                        break;
                    case 'andWhere':
                        $this->andWhere($filter['field'], $filter['operation'], $filter['value']);
                        break;
                    case 'orWhere':
                        $this->orWhere($filter['field'], $filter['operation'], $filter['value']);
                        break;
                    case 'andHaving':
                        $this->andHaving($filter['field'], $filter['operation'], $filter['value']);
                        break;
                    case 'orHaving':
                        $this->orHaving($filter['field'], $filter['operation'], $filter['value']);
                        break;
                    case 'addGroupBy':
                        $this->addGroupBy($filter['field']);
                        break;
                    case 'addOrderBy':
                        $this->addOrderBy($filter['field'], $filter['order']);
                        break;
                    case 'fkAddOrderBy':
                        $this->fkAddOrderBy($filter['field'], $filter['fkField'], $filter['order']);
                        break;
                    case 'paginate':
                        if (isset($filter['page'])) {
                            $this->paginate($filter['limit'], $filter['page']);
                        } else {
                            $this->paginate($filter['limit']);
                        }
                        break;
                }
            }
        }

        return $this;
    }
179812
public function get($filters = [], $sorts = [], $fields = [], $embeds = [])
	{
		$query = $this->model;

		foreach($filters as $filter)
		{
			if($filter['or'])
			{
				$query = $query->orWhere($filter['field'], $filter['operator'], $filter['value']);
			}
			else
			{
				$query = $query->where($filter['field'], $filter['operator'], $filter['value']);
			}
		}

		foreach($embeds as $embed)
		{
			$this->eagerLoad($embed);
		}

		foreach($sorts as $key => $sort)
		{
			$query = $query->orderBy($sort['field'], $sort['direction']);
		}

		// @todo: implement fields

		$retrieved = $this->retrieve($query);

		if($retrieved->isEmpty())
		{
			return new Payload($retrieved, 'not_found');
		}

		return new Payload($retrieved, 'found');
	}
1153902
public function delete(array $filters = [])
    {
        /** @var QueryBuilder $qb */
        $qb = $this->om->createQueryBuilder();
        $qb->delete($this->getClass(), 'obj');

        // filter query - let's the finder implementation process the filters to configure query
        $query = $this->configureQueryBuilder($qb, $filters);

        if ($query instanceof QueryBuilder) {
            $qb = $query;
        }

        if (!($query instanceof NativeQuery)) {
            // order query if implementation has not done it
            $query = $qb->getQuery();
        }

        $query->getResult();
    }
213734
public function whereSearch($filters)
    {
        $data = $this->request->get();

        foreach ($filters as $k => $v) {
            preg_match('#^(\w+)(.*)$#', is_string($k) ? $k : $v, $match);
            $field = $match[1];

            if (is_int($k)) {
                if (!isset($data[$field])) {
                    continue;
                }
                $value = $data[$field];
                if (is_string($value)) {
                    $value = trim($value);
                    if ($value === '') {
                        continue;
                    }
                }
                $this->where($v, $value);
            } else {
                $this->where($k, $v);
            }
        }

        return $this;
    }
1166458
public function filters(array $filters)
    {

        foreach ($filters as $name => $options) {
            $this->filter($name, $options);
        }

        return $this;
    }
124266
public MongoDeepJobConfig<T> filterQuery(Filter[] filters) {

        if (filters.length > 0) {
            List<BasicDBObject> list = new ArrayList<>();

            QueryBuilder queryBuilder = QueryBuilder.start();
            for (int i = 0; i < filters.length; i++) {
                BasicDBObject bsonObject = new BasicDBObject();

                Filter filter = filters[i];
                if (filter.getFilterType().equals(FilterType.EQ)) {
                    bsonObject.put(filter.getField(), filter.getValue());
                } else {
                    bsonObject.put(filter.getField(),
                            new BasicDBObject("$".concat(filter.getFilterType().getFilterTypeId().toLowerCase()),
                                    filter.getValue()));
                }

                list.add(bsonObject);
            }
            queryBuilder.and(list.toArray(new BasicDBObject[list.size()]));

            filterQuery(queryBuilder);
        }
        return this;

    }
1194976
public function filter(...$filters)
    {
        if (sizeof($filters) == 0) {
            return $this;
        }

        $andGroup = new AndGroup();

        if (is_array($filters[0])) {
            $filters = $filters[0];
        }

        foreach ($filters as $filter) {
            if (!($filter instanceof Filter)) {
                throw new FilterNotSupportedException('One or more of the parameters, or one or more elements of an array parameter, was not of the Filter Class');
            }

            $andGroup->addFilters($filter);
        }

        if (sizeof($filters) == 1) {
            $andGroup = $filters[0];
        }

        if (is_null($this->filter)) {
            $this->filter = $andGroup;
        } else {
            $this->filter = new AndGroup([$andGroup, $this->filter]);
        }

        $this->invalidate();

        return $this;
    }
1285672
public function addFilter($filters)
    {
        $filters = (array) AnConfig::unbox($filters);

        foreach ($filters as $filter) {
            if (!($filter instanceof LibBaseTemplateFilterInterface)) {
                $filter = $this->getFilter($filter);
            }
            
            //Enqueue the filter in the command chain
            $this->getCommandChain()->enqueue($filter);
            
            //Store the filter
            $this->_filters[$filter->getIdentifier()->name] = $filter;
        }
        
        return $this;
    }
851785
public function setFilters($filters = []) {
		if ($filters) {
			foreach ($filters as $key => $value) {
				$this->setFilter($key, $value);
			}
		}

		return $this;
	}
569021
public function append($filters)
    {
        if ($filters instanceof FilterBuilder) {
            $filters = $filters->getFilter();
        }

        if ($filters instanceof AndFilterBuilder) {
            foreach (clone $filters as $filter) {
                $this->add(clone $filter);
            }

            return $this;
        }

        $this->andEncapsulate(clone $filters);

        return $this;
    }
1250090
public function filterAll(array $filters)
    {
        $filterList = [];
        foreach ($filters as $key => $value) {
            $filterList[] = $key . ':' . $value;
        }

        $result = $this->connection()->get($this->getEndpoint(), ['filter' => implode(',', $filterList)], true);

        return $this->collectionFromResult($result);
    }
54683
public function addFilters($filters) {
        if (!is_array($filters) && !$filters instanceof Traversable) {
            return $this;
        }
        foreach ($filters as $filter) {
            $this->addFilter($filter);
        }
        return $this;
    }
49453
public function withFilter(Filter $filter)
    {
        if ($this->value->isNull()) {
            return null;
        }

        return $this->applyFilter($filter);
    }
909179
public function setFilters(\Plop\FiltersCollectionAbstract $filters)
    {
        $logger = $this->getIndirectLogger();
        $logger->setFilters($filters);
        return $this;
    }
1021721
private function getQueryFilter($filters)
    {
        $where = '';
        if (!empty($filters))
        {
            foreach ($filters as $filterKey => $filterValue)
            {
                $where .= ' AND m.' . $filterKey . ' LIKE :' . $filterKey;
            }
            $where = ' WHERE ' . substr($where, 4);
        }
        return $where;
    }
18969
public function addFilter($filter)
    {
        if (!($filter instanceof FilterInterface) && !is_callable($filter)) {
            $filter = FilterHelper::create($filter);
        }

        $this->filter->addFilter($filter);

        return $this;
    }
1256419
public function list(array $filters = [])
    {
        $data = [
            'filters' => json_encode($filters),
        ];

        $url = $this->url.'?'.http_build_query($data);

        return $this->curl->get($url);
    }