Return an array of Filter objects.
439668
def init(req, model):
    

    fields = model.all_fields
    rels = model.relationships
    params = []

    for key, val in req.params.items():
        try:
            field, oper = _parse_param(key)
        except (TypeError, ValueError):
            continue

        try:
            local_field, foreign_filter = field.split('/')
            field_type = getattr(model, local_field)

            foreign_field = field_type.field
            foreign_rtype = field_type.rtype

            if hasattr(field_type, 'local_field'):
                local_field = field_type.local_field

            param = FilterRel(foreign_field, foreign_filter, foreign_rtype,
                              local_field, field, oper, val)
        except AttributeError:
            raise InvalidQueryParams(**{
                'detail': 'The filter query param "%s" specified a filter '
                          'containing a "." indicating a relationship filter '
                          'but a relationship by that name does not exist '
                          'on the requested resource.' % key,
                'links': LINK,
                'parameter': PARAM,
            })
        except ValueError:
            param = Filter(field, oper, val)

        _validate_param(param)
        _validate_rel(param, rels)
        _validate_field(param, fields)
        params.append(param)

    return params
735237
def filter(self, table, group_types, filter_string):
        """"""
        query = filter_string.lower()
        return [group_type for group_type in group_types
                if query in group_type.name.lower()]
1011968
public function getFilters(): array
    {
        return [
            new TwigFilter('pluralize', 'Cake\Utility\Inflector::pluralize'),
            new TwigFilter('singularize', 'Cake\Utility\Inflector::singularize'),
            new TwigFilter('camelize', 'Cake\Utility\Inflector::camelize'),
            new TwigFilter('underscore', 'Cake\Utility\Inflector::underscore'),
            new TwigFilter('humanize', 'Cake\Utility\Inflector::humanize'),
            new TwigFilter('tableize', 'Cake\Utility\Inflector::tableize'),
            new TwigFilter('classify', 'Cake\Utility\Inflector::classify'),
            new TwigFilter('variable', 'Cake\Utility\Inflector::variable'),
            new TwigFilter('dasherize', 'Cake\Utility\Inflector::dasherize'),
            new TwigFilter('slug', 'Cake\Utility\Text::slug'),
        ];
    }
297945
def _match_filters(parameter, filters=None):
        """"""
        for filter_obj in (filters or []):
            key = filter_obj['Key']
            option = filter_obj.get('Option', 'Equals')
            values = filter_obj.get('Values', [])

            what = None
            if key == 'Type':
                what = parameter.type
            elif key == 'KeyId':
                what = parameter.keyid

            if option == 'Equals'\
                    and not any(what == value for value in values):
                return False
            elif option == 'BeginsWith'\
                    and not any(what.startswith(value) for value in values):
                return False
        # True if no false match (or no filters at all)
        return True
44992
def parse_query_filter():
    """"""
    query_string = request.args.get("queryFilter")
    if query_string is None:
        return {"type": "and", "filters": []}
    query = json.loads(query_string)
    assert type(query) == dict
    assert type(query.get("type")) == str
    return query
1029674
public function getFilters(): array
    {
        return [
            new TwigFilter('substr', 'substr'),
            new TwigFilter('tokenize', 'Cake\Utility\Text::tokenize'),
            new TwigFilter('insert', 'Cake\Utility\Text::insert'),
            new TwigFilter('cleanInsert', 'Cake\Utility\Text::cleanInsert'),
            new TwigFilter('wrap', 'Cake\Utility\Text::wrap'),
            new TwigFilter('wrapBlock', 'Cake\Utility\Text::wrapBlock'),
            new TwigFilter('wordWrap', 'Cake\Utility\Text::wordWrap'),
            new TwigFilter('highlight', 'Cake\Utility\Text::highlight'),
            new TwigFilter('tail', 'Cake\Utility\Text::tail'),
            new TwigFilter('truncate', 'Cake\Utility\Text::truncate'),
            new TwigFilter('excerpt', 'Cake\Utility\Text::excerpt'),
            new TwigFilter('toList', 'Cake\Utility\Text::toList'),
            new TwigFilter('isMultibyte', 'Cake\Utility\Text::isMultibyte'),
            new TwigFilter('utf8', 'Cake\Utility\Text::utf8'),
            new TwigFilter('ascii', 'Cake\Utility\Text::ascii'),
            new TwigFilter('parseFileSize', 'Cake\Utility\Text::parseFileSize'),
            new TwigFilter('none', function ($string) {
                return;
            }),
        ];
    }
710072
def filter(self, table, idps, filter_string):
        """"""
        q = filter_string.lower()
        return [idp for idp in idps
                if q in idp.ud.lower()]
11780
def get_filters(self):
        
        return dict(
            moment_format=self.format,
            moment_calendar=self.calendar,
            moment_fromnow=self.from_now,
        )
890326
public static mps[] get_filtered(nitro_service service, String filter) throws Exception
	{
		mps obj = new mps();
		options option = new options();
		option.set_filter(filter);
		mps[] response = (mps[]) obj.getfiltered(service, option);
		return response;
	}
608967
def items(self):
        ''''''
        if hasattr(self, '_items'):
            return self.filter_items(self._items)
        self._items = self.get_items()
        return self.filter_items(self._items)
175286
public function getFiltering(): array
    {
        if ($this->filtering === null) {
            $this->filtering = $this->setFiltering();
        }

        return $this->filtering;
    }
1351299
public static server[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
		server obj = new server();
		options option = new options();
		option.set_filter(filter);
		server[] response = (server[]) obj.getfiltered(service, option);
		return response;
	}
143189
protected function getFilterResolver(string $filter): array
    {
        $class = $filter;
        $method = 'filter';

        $position = \strpos($filter, '@');

        if ($position === 0) {
            $method = 'filter'.\ucwords(\substr($filter, 1));

            return [$this, $method];
        }

        if ($position !== false) {
            list($class, $method) = \explode('@', $filter, 2);
        }

        return $this->makeFilterResolver($class, $method);
    }
1170497
public function getFilters()
    {
        $filters = [];
        foreach ($this->getFields() as $field) {
            $filters[$field->getName()] = $field->getFilters();
        }

        return $filters;
    }
1158726
public function getAdditionalFilters() : array
    {
        // when we've build the additionalFilter once, we could return them
        if (count($this->additionalFilters) > 0) {
            return $this->additionalFilters;
        }

        $searchQueryFilters = $this->typoScriptConfiguration->getSearchQueryFilterConfiguration();
        if (!is_array($searchQueryFilters) || count($searchQueryFilters) <= 0) {
            return [];
        }

        $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);

        // all other regular filters
        foreach ($searchQueryFilters as $filterKey => $filter) {
            // the __pageSections filter should not be handled as additional filter
            if ($filterKey === '__pageSections') {
                continue;
            }

            $filterIsArray = is_array($searchQueryFilters[$filterKey]);
            if ($filterIsArray) {
                continue;
            }

            $hasSubConfiguration = is_array($searchQueryFilters[$filterKey . '.']);
            if ($hasSubConfiguration) {
                $filter = $cObj->stdWrap($searchQueryFilters[$filterKey], $searchQueryFilters[$filterKey . '.']);
            }

            $this->additionalFilters[$filterKey] = $filter;
        }

        return $this->additionalFilters;
    }
373380
def get_filters(self, filter_id=None, params=None):
        
        return self.transport.perform_request(
            "GET", _make_path("_ml", "filters", filter_id), params=params
        )
990819
def apply_filter_list(func, obj):
    """"""
    if isinstance(obj, (list, tuple)):
        return [func(item) for item in obj]
    return func(obj)