Analiza los filtros que mapean con la URI pasada y ejecuta los que correspondan. En caso de no pasar URI se utiliza
la de la peticion actual.
@param array[array] $filters
@param string $uriapp
769139
protected function executeFilters($filters, $uriapp = NULL){
        //Analizo los filtros y los aplico en caso de que corresponda
        foreach ($filters as $filter_esp) {
            $filter= UrlUri::mapsActualUrl($filter_esp['filtered'], $uriapp);
            //Si debe filtrar carga el filtro correspondiente y realiza el llamo al metodo filtrar()
            if($filter){
                $dir= $this->buildDir($filter_esp,'filters');
                $class= $this->buildClass($filter_esp);
                if(!class_exists($class)){
                    //Si la clase no existe intento cargarla
                    if(file_exists($dir)){
                        require_once $dir;
                    }else{
                        //Avisa que el archivo no existe
                        Error::general_error('Filter Error', 'The filter ' . $filter_esp['class'] . ' dont exists');
                    } 
                }
                $filterIns= new $class();
                //Analizo si hay parametros en la configuracion
                if(isset($filter_esp['properties'])){
                    $this->app->dependenciesEngine->injectProperties($filterIns, $filter_esp['properties']);
                }
                //Analiza si existe el metodo filtrar
                if(method_exists($filterIns, 'filter')){
                    $rta= $filterIns->filter($this->httpRequest, $this->httpResponse);
                    if($rta === false){
                        return false;
                    }
                }
                else{
                    Error::general_error('Filter Error', 'The filter ' . $filter_esp['class'] . ' dont implement the method filter()');
                }
            }
        }
    }
283203
private static function validateFilters($filters, $settings)
    {
        if (!is_array($filters)) {
            $filters = [$filters];
        }

        // Each fitler.
        foreach ($filters as $index => &$filter) {

            // Check this item.
            $filter = self::validateFilterItem($filter, $settings);

            // Remove if invalid.
            if (empty($filter)) {
                unset($filters[$index]);
            }
        }

        return $filters;
    }
637
public function setFilters($filters)
    {
        if (! is_array($filters))
            $filters = [$filters];

        $this->filters = array_unique(array_merge($this->filters, $filters));

        return $this;
    }
298618
public function getAll(array $filters = null)
    {
        $search = $this->repository->createSearch();
        $search->addQuery(new MatchAllQuery());
        $search->setScroll('2m');

        if ($filters) {
            foreach ($filters as $field => $value) {
                $search->addQuery(new TermsQuery($field, $value));
            }
        }

        return $this->repository->findDocuments($search);
    }
1263956
public function list(array $filters = [])
    {
        return $this->curl->get($this->base_url.'?'.http_build_query([
                    'filters' => json_encode($filters),
                ]
            )
        );
    }
414419
public function filters($filters)
    {
        if(!is_array($filters)){
            throw new \RuntimeException('Filters not specified', ResourceException::FILTERS_NOT_SPECIFIED);
        }

        $this->filters = json_encode($filters);

        return $this;
    }
173721
public function setFilters($filters)
    {
        if(is_null($filters)){
            $filters = "";
        }
        if (is_string($filters)) {
            $filters = $this->parseFilters($filters);
        }

        $this->filters = array_merge($this->filters, $filters);
    }
122475
public function filters($ext, $filters = null)
    {
        if ($filters === null) {
            if (isset($this->_data[$ext][self::FILTERS])) {
                return $this->_data[$ext][self::FILTERS];
            }
            return [];
        }
        $this->_data[$ext][self::FILTERS] = $filters;
    }
345056
public function setFilters(array $filters)
    {
        if (empty($filters)) {
            return $this->clearFilters();
        }

        session()->put($this->getSessionKey(static::TYPE_FILTERS), $filters);

        return $this;
    }
1264399
function find(array $filters = array(), $max = 20, $offset = 0)
    {
        $criteria = [
            '$and' => [
                ['__meta.sid' => $this->sid],
            ],
        ];
        if (isset($filters['method'])) {
            $criteria['$and'][]['__meta.method'] = $filters['method'];
        }
        if (isset($filters['uri'])) {
            $criteria['$and'][]['__meta.uri'] = $filters['uri'];
        }
        if (isset($filters['ip'])) {
            $criteria['$and'][]['__meta.ip'] = $filters['ip'];
        }
        $iterator = $this->collection->find(
            $criteria,
            [
                'skip'  => (int)$offset,
                'limit' => (int)$max,
                'sort'  => ['__meta.utime' => -1],
            ]);
        $array = iterator_to_array($iterator);
        $result = array();
        foreach ($array as $value) {
            if (isset($value['__meta'])) {
                $result[] = $value['__meta'];
            }
        }

        return $result;
    }
203414
public function setFilters($filters)
    {

        if (!is_array($filters)) {

            $this->clearFilters();
            foreach(explode('|', $filters) as $filter) {
                // searching for optional params
                $params = [];
                if (strpos($filter, ':')) {
                    list($filter, $params) = explode(':', $filter);
                    $params = (array) explode(',', $params);
                }

                $this->addFilter($filter, null, ...$params);
            }
        } else {
            $this->filters = $filters;
        }

        return $this;
    }
747931
protected function filterArguments($filters = [])
    {
        $arguments = $this->arguments;

        foreach ($filters as $filter) {
            $arguments = array_filter($arguments, [$this, $filter]);
        }

        if (in_array('hasPrefix', $filters)) {
            usort($arguments, [$this, 'compareByPrefix']);
        }

        return array_values($arguments);
    }
1227290
public function applyFiltersToRepository(
        array $filters,
        FilterFactory $filterFactory,
        ConditionAwareRepository $repository
    )
    {
        if (empty($filters) && ($defaultFilter = $filterFactory->getDefaultFilter()) !== null) {
            $filters = ['default' => $defaultFilter];
        }

        foreach ($filters as $filterName => $filterValues) {
            try {
                $filter = $filterFactory->make($filterName, $filterValues);
            } catch (FilterFactoryNotFoundException $e) {
                continue;
            }

            $repository->applyCondition($filter);
        }
    }
1094087
public function setFilters($filters = [])
    {
        foreach ($filters as $field => $rules) {
            if ($field === 'fullSearch') {
                $this->addFilter($field, $rules, null);
                continue;
            }

            if (is_a($rules, MultiFullTextFilter::class)) {
                $this->addFilter($field, $rules, null);
                continue;
            }

            foreach ($rules as $operator => $value) {
                if (!in_array($operator, $this->availableFilters) || (empty($value) && $value != '0')) {
                    continue;
                }
                $this->addFilter($field, $value, $operator);
            }
        }

        return $this;
    }
619738
public function AddFilter(CriteriaFilter $filter)
	{
		if (!$this->Filters) $this->Filters = array();
		$this->Filters[] = $filter;
	}
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();
    }
850294
private function applyFilters($filters = [], $returnCount = false)
    {
        $result = null;
        // Convert our filters into a query.
        if ($filters) {
            $alias = $this->getTableAlias();
            $query = $this->slaveQueryBuilder();
            if ($returnCount) {
                $query->select('COUNT(*)');
            } else {
                // Selecting only the id and contact_id for covering index benefits.
                $query->select($alias.'.id, '.$alias.'.contact_id');
                $query->setMaxResults(1);
            }
            $query->from(MAUTIC_TABLE_PREFIX.$this->getTableName(), $alias);

            foreach ($filters as $k => $set) {
                // Expect orx, anx, or neither.
                if (isset($set['orx'])) {
                    if (!empty($set['orx'])) {
                        $expr = $query->expr()->orX();
                    }
                    $properties = $set['orx'];
                } elseif (isset($set['andx'])) {
                    if (!empty($set['andx'])) {
                        $expr = $query->expr()->andX();
                    }
                    $properties = $set['andx'];
                } else {
                    if (!isset($expr)) {
                        $expr = $query->expr()->andX();
                    }
                    $properties = $set;
                }
                if (isset($expr) && !empty($properties)) {
                    foreach ($properties as $property => $value) {
                        if (is_array($value)) {
                            $expr->add(
                                $query->expr()->andX(
                                    $query->expr()->isNotNull($alias.'.'.$property),
                                    $query->expr()->in($alias.'.'.$property, $value)
                                )
                            );
                        } elseif (is_int($value) || is_string($value)) {
                            if (!empty($value)) {
                                $expr->add(
                                    $query->expr()->andX(
                                        $query->expr()->isNotNull($alias.'.'.$property),
                                        $query->expr()->eq($alias.'.'.$property, ':'.$property.$k)
                                    )
                                );
                            } else {
                                $expr->add(
                                    $query->expr()->eq($alias.'.'.$property, ':'.$property.$k)
                                );
                            }
                            if (in_array($property, ['category_id', 'contact_id', 'campaign_id', 'contactclient_id'])) {
                                // Explicit integers for faster queries.
                                $query->setParameter($property.$k, (int) $value, \PDO::PARAM_INT);
                            } else {
                                $query->setParameter($property.$k, $value);
                            }
                        }
                    }
                }
                if (isset($set['exclusive_expire_date'])) {
                    // Expiration/Exclusions will require an extra outer AND expression.
                    if (!isset($exprOuter)) {
                        $exprOuter  = $query->expr()->orX();
                        $expireDate = $set['exclusive_expire_date'];
                    }
                    if (isset($expr)) {
                        $exprOuter->add(
                            $query->expr()->orX($expr)
                        );
                    }
                } elseif (isset($set['contactclient_id']) && isset($set['date_added'])) {
                    $query->add(
                        'where',
                        $query->expr()->andX(
                            $query->expr()->eq($alias.'.contactclient_id', ':contactClientId'.$k),
                            $query->expr()->gte($alias.'.date_added', 'FROM_UNIXTIME(:dateAdded'.$k.')'),
                            (isset($expr) ? $expr : null)
                        )
                    );
                    $query->setParameter('contactClientId'.$k, (int) $set['contactclient_id'], \PDO::PARAM_INT);
                    $query->setParameter('dateAdded'.$k, $set['date_added']);
                }
            }
            // Expiration can always be applied globally.
            if (isset($exprOuter) && isset($expireDate)) {
                $query->add(
                    'where',
                    $query->expr()->andX(
                        $query->expr()->isNotNull($alias.'.exclusive_expire_date'),
                        $query->expr()->gte($alias.'.exclusive_expire_date', 'FROM_UNIXTIME(:exclusiveExpireDate)'),
                        $exprOuter
                    )
                );
                $query->setParameter('exclusiveExpireDate', $expireDate);
            }

            $result = $query->execute()->fetch();
            if ($returnCount) {
                $result = intval(reset($result));
            }
        }

        return $result;
    }