Sets the filters to the storage according to the [[map]].

@param $filters
@throws InvalidConfigException
@see map
331514
public function set($filters)
    {
        $filters = (array) $filters;

        foreach ($this->map as $attribute => $key) {
            if (!isset($filters[$attribute])) {
                continue;
            }

            $value = $filters[$attribute];
            $this->setByKey($key, $value);
        }
    }
374058
private function sanitizeFilters(array $filters): array
    {
        $sanitized = array_filter($filters, function (string $name): bool {
            return isset($this->loaders[$name]);
        }, ARRAY_FILTER_USE_KEY);

        if (\count($filters) !== \count($sanitized)) {
            throw new \InvalidArgumentException(sprintf('Could not find filter(s): %s', implode(', ', array_map(function (string $name): string {
                return sprintf('"%s"', $name);
            }, array_diff(array_keys($filters), array_keys($sanitized))))));
        }

        return $sanitized;
    }
369162
public function initialize($value, $filters = [])
    {
        parent::initialize($value, $filters);

        foreach ($this->fileSearchDirectories as $directory)
        {
            $filename = $directory . DIRECTORY_SEPARATOR . $value;
            if (is_file($filename))
            {
                $this->actualFilePath = $filename;
                return;
            }
        }
    }
1368110
private function addFilter($filter)
    {
        if (is_array($filter)) {
            if (!isset($filter['method'])) {
                throw new \InvalidArgumentException(
                    'A [method] value must be specified for each complex filter'
                );
            }
        }

        if (!$this->filters) {
            $this->filters = [$filter];
        } else {
            $this->filters[] = $filter;
        }

        return $this;
    }
938246
public function addFilter($filters)
    {

        $filters = is_array($filters) ? $filters : func_get_args();

        foreach ($filters as $filter) {

            $this->filters[] = $filter;
        }

        return $this;
    }
539560
public function applyFromArray($filters)
    {
        foreach ($filters as $key => $value)
        {
            $filter = $this->factory->get('filter')->make(is_callable($value) ? $key : $value)->setResource($this);

            is_callable($value) and call_user_func($value, $filter);

            $this->filters[$filter->getFilter()] = $filter;
        }

        return $this;
    }
1052485
public function filter(array $filters)
	{
		foreach ($filters as $filter) {
			if ($filter->isValueSet()) {
				if ($filter->hasConditionCallback()) {
					Callback::invokeArgs(
						$filter->getConditionCallback(),
						[$this->data_source, $filter->getValue()]
					);
				} else {
					if ($filter instanceof Filter\FilterText) {
						$this->applyFilterText($filter);
					} elseif ($filter instanceof Filter\FilterMultiSelect) {
						$this->applyFilterMultiSelect($filter);
					} elseif ($filter instanceof Filter\FilterSelect) {
						$this->applyFilterSelect($filter);
					} elseif ($filter instanceof Filter\FilterDate) {
						$this->applyFilterDate($filter);
					} elseif ($filter instanceof Filter\FilterDateRange) {
						$this->applyFilterDateRange($filter);
					} elseif ($filter instanceof Filter\FilterRange) {
						$this->applyFilterRange($filter);
					}
				}
			}
		}

		return $this;
	}
599761
private function initFilters(array $filters)
    {
    	$result = array();
    
    	$fm = $this->getFilterManager();
    
    	foreach ($filters as $alias => $options) {
    		$option = null;
    		if (is_array($options)) {
    			if (!isset($options['name'])) {
    				throw new Exception\InvalidArgumentException(
    						'Filter "' . $alias . '" required option "name"'
    				);
    			}
    
    			$name = $options['name'];
    			$option = isset($options['option']) ? $options['option'] : null;
    		} elseif (is_string($options)) {
    			$name = $options;
    			unset($options);
    		}
    
    		if (is_numeric($alias)) {
    			$alias = $name;
    		}
    
    		// Filter Id should have optional filter indicator "?"
    		$filterId = ltrim($alias, '?');
    
    		if (!$fm->has($filterId)) {
    			if (is_array($option) && !empty($option)) {
    				$r = new \ReflectionClass($name);
    				$filter = $r->newInstanceArgs($option);
    			} else if ($option) {
    				$filter = new $name($option);
    			} else {
    				$filter = new $name();
    			}
    
    			$fm->set($filterId, $filter);
    		}
    
    		$result[] = $alias;
    	}
    
    	return $result;
    }
1359211
public function setFilters(array $filters)
    {
        $this->clearFilters();
        foreach ($filters as $filter) {
            $this->addFilter($filter);
        }

        return $this;
    }
248538
public void setFilters(Filter[] filters) {
        if (filters != null && filters.length > 0
                && this.filters != null && this.filters.length > 0) {
            Filter[] oldFilters = this.filters;
            this.filters = new Filter[oldFilters.length + filters.length];
            System.arraycopy(oldFilters, 0, this.filters, 0, oldFilters.length);
            System.arraycopy(filters, 0, this.filters, oldFilters.length, filters.length);
        } else {
            this.filters = filters;
        }
    }
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();
    }
231239
public function setOperators(array $operators)
    {
        $invalid = [];
        if (!$this->validateOperators($operators, $invalid)) {
            throw new \InvalidArgumentException(\sprintf('Trying to set invalid operator(s) "%s" for filter "%s"', \implode(', ', $operators), $this->getName()));
        }
        $this->operators = $operators;

        return $this;
    }
336671
public function addFilter($filter)
    {
        if (!$filter instanceof FilterInterface) {
            if (!is_callable($filter)) {
                throw new \InvalidArgumentException('Filter should be callable or ' . FilterInterface::class);
            }

            $filter = new CallbackFilter($filter);
        }

        $this->filters[] = $filter;

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

        $this->andEncapsulate((clone $filters)->setBuilder($this->getBuilder()));

        return $this;
    }
1228752
public function filters(Collection $filters)
    {
        foreach ($filters as $element) {
            // do not apply filter if no request var were found.
            if (!app('request')->has($element->id())) {
                continue;
            }

            $this->assemblyQuery($element);
        }

        return $this;
    }
589532
public static function applyAssetVariablesToCombinerFilters($filters)
    {
        $theme = CmsTheme::getActiveTheme();

        if (!$theme){
            return;
        }

        if (!$theme->hasCustomData()) {
            return;
        }

        $assetVars = $theme->getCustomData()->getAssetVariables();

        foreach ($filters as $filter) {
            if (method_exists($filter, 'setPresets')) {
                $filter->setPresets($assetVars);
            }
        }
    }
909179
public function setFilters(\Plop\FiltersCollectionAbstract $filters)
    {
        $logger = $this->getIndirectLogger();
        $logger->setFilters($filters);
        return $this;
    }