Register the filter(s) on the given zone.

@param  string  $zone
@param  string|array  $filters
@param  bool  $exclude
@return void
778363
protected function registerFilter($zone, $filters, $exclude = false)
    {
        if ( ! is_array($filters)) {
            $filters = (array) $filters;
        }

        $alerts = $this->filteredAlerts;

        if ( ! $this->filters && ! $this->filteredAlerts) {
            $alerts = $this->getAllAlerts($alerts);
        }

        if ($filters) {
            $type = $exclude ? 'exclude' : 'include';

            $this->filters[$type][$zone] = array_merge(array_get($this->filters, "{$type}.{$zone}", []), $filters);

            $alerts = array_filter($alerts, function ($message) use ($zone, $filters, $exclude) {
                if ($exclude) {
                    return ! in_array($message->{$zone}, $filters);
                }

                return in_array($message->{$zone}, $filters);
            });
        }

        $this->filteredAlerts = $alerts;
    }
164143
protected function addFilters($type, $filters)
	{
		$filters = static::explodeFilters($filters);

		if (isset($this->action[$type]))
		{
			$existing = static::explodeFilters($this->action[$type]);

			$this->action[$type] = array_merge($existing, $filters);
		}
		else
		{
			$this->action[$type] = $filters;
		}

		return $this;
	}
107976
public static function checkFilter(string $type, array $filters)
    {
        $filters_array_define = 'filters_array_'.$type;

        try {
            $filters_array_define = self::$$filters_array_define;
        } catch (\Throwable $e) {
            throw new Exception($e->getMessage(), 500);
        }

        $filters_array = [];

        foreach ($filters as $filter => $v) {
            if (!\in_array($filter, $filters_array_define, true)) {
                throw new Exception($filter, 500);
            }

            if (\is_array($v)) {
                $filters_array[$filter] = $v;

                continue;
            }

            $filters_array[$filter] = [$v];
        }

        return json_encode($filters_array);
    }
1071307
protected function addFilters($type, $filters)
	{
		if (isset($this->action[$type]))
		{
			$this->action[$type] .= '|'.$filters;
		}
		else
		{
			$this->action[$type] = $filters;
		}

		return $this;
	}
35461
public function applyFilters($filters, FilterFactory $filterFactory, ConditionAwareRepository $repository)
    {
        //  @see Ipunkt\LaravelJsonApi\Services\FilterApplier\FilterApplier
        \FilterApplier::applyFiltersToRepository($filters, $filterFactory, $repository);
    }
462019
private function processZone(Zone $zone, array $zoneData): void
    {
        $this->createBlocks($zone, $zoneData['blocks']);
        if (is_array($zoneData['linked_zone'])) {
            $this->linkZone($zone, $zoneData['linked_zone']);
        }
    }
345056
public function setFilters(array $filters)
    {
        if (empty($filters)) {
            return $this->clearFilters();
        }

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

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

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

        return $this;
    }
320302
public function setExclude($exclude) {

		if(false === is_array($exclude)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type Array, "%s" given', __METHOD__, gettype($exclude)), E_USER_ERROR);
		}

		$this -> exclude = $exclude;

		return $this;
	}
859546
public function applyFilterSelect(Filter\FilterSelect $filter)
	{
		$this->data_source = $this->data_source->findBy([$this->prepareColumn($filter->getColumn()) => $filter->getValue()]);
	}
788510
public function applyFilterSelect(Filter\FilterSelect $filter)
	{
		foreach ($filter->getCondition() as $column => $value) {
			$expr = Criteria::expr()->eq($column, $value);
			$this->criteria->andWhere($expr);
		}
	}
1304455
private function loadProfileFilters(ContainerBuilder $container, array $filters)
    {
        $gherkin = $container->getDefinition(self::MANAGER_ID);
        foreach ($filters as $type => $filterString) {
            $filter = $this->createFilterDefinition($type, $filterString);
            $gherkin->addMethodCall('addFilter', array($filter));
        }
    }
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;
    }
1368609
public function applyFilters(array $filters, bool $strict = false)
    {
        foreach ($filters ?? [] as $filterName => $filterValue) {
            if ($filterValue === null) {
                continue;
            }

            if (!property_exists($this->getModelName(), $filterName)) {
                if ($strict) {
                    throw new \Exception("Param $filterName not found for class {$this->getModelName()}");
                }
                continue;
            }

            $this->andWhere("{$this->getAlias()}.{$filterName} = :{$filterName}:", [$filterName => $filterValue]);
        }

        return $this;
    }
630832
function SetFilter ( $attribute, $values, $exclude=false )
    {
        assert ( is_string($attribute) );
        assert ( is_array($values) );
        assert ( count($values) );

        if ( is_array($values) && count($values) )
        {
            foreach ( $values as $value )
                assert ( is_numeric($value) );

            $this->_filters[] = array ( "type"=>SPH_FILTER_VALUES, "attr"=>$attribute, "exclude"=>$exclude, "values"=>$values );
        }
    }
1339418
public function setFilter($attribute, $values, $exclude = false)
    {
        $this->sphinx->setFilter($attribute, $values, $exclude);
    }
210486
private function applyExcludesAndIncludes(array $files, array $excludes = [], array $includes = []): array
    {
        if (!$excludes) {
            return $files;
        }

        foreach ($files as $key => $file) {
            if ($this->isMatch($file['relative_path'], $excludes)
                && !$this->isMatch(
                    $file['relative_path'],
                    $includes
                )) {
                unset($files[$key]);
            }
        }

        // Reindex to avoid confusion when comparing last index to count
        return array_values($files);
    }