{@inheritDoc}
@see \Zend\InputFilter\InputFilterProviderInterface::getInputFilterSpecification()
777857
public function getInputFilterSpecification()
    {
        $spec = array();
        foreach ($this->getElements() as $element) {
            $name = (string) $element->getName();
            $spec[$name] = array(
                'name' => $name,
            );
        }
        return $spec;
    }
1254405
public static function createFilter($filterName)
    {
        $editorName = self::detectAvailableEditor();
        $p = func_get_args();
        if ('Imagick' === $editorName) {
            switch ($filterName){
                case 'Blur':
                    return new ImagickBlur(
                        (array_key_exists(1,$p) ? $p[1] : 1)
                    );
                case 'Brightness':
                    return new ImagickBrightness(
                        $p[1]
                    );
                case 'Colorize':
                    return new ImagickColorize(
                        $p[1], $p[2], $p[3]
                    );
                case 'Contrast':
                    return new ImagickContrast(
                        $p[1]
                    );
                case 'Dither':
                    return new ImagickDither(
                        $p[1]
                    );
                case 'Gamma':
                    return new ImagickGamma(
                        $p[1]
                    );
                case 'Grayscale':
                    return new ImagickGrayscale();
                case 'Invert':
                    return new ImagickInvert();
                case 'Pixelate':
                    return new ImagickPixelate(
                        $p[1]
                    );
                case 'Sharpen':
                    return new ImagickSharpen(
                        $p[1]
                    );
                case 'Sobel':
                    return new ImagickSobel();
            }
            throw new \Exception('Invalid filter name.');
        } else {
            switch ($filterName){
                case 'Blur':
                    return new GdBlur(
                        (array_key_exists(1,$p) ? $p[1] : 1)
                    );
                case 'Brightness':
                    return new GdBrightness(
                        $p[1]
                    );
                case 'Colorize':
                    return new GdColorize(
                        $p[1], $p[2], $p[3]
                    );
                case 'Contrast':
                    return new GdContrast(
                        $p[1]
                    );
                case 'Dither':
                    return new GdDither(
                        $p[1]
                    );
                case 'Gamma':
                    return new GdGamma(
                        $p[1]
                    );
                case 'Grayscale':
                    return new GdGrayscale();
                case 'Invert':
                    return new GdInvert();
                case 'Pixelate':
                    return new GdPixelate(
                        $p[1]
                    );
                case 'Sharpen':
                    return new GdSharpen(
                        $p[1]
                    );
                case 'Sobel':
                    return new GdSobel();
            }
            throw new \Exception('Invalid filter name.');
        }
    }
213003
private function resolveFilterType(Filter\FilterTypeInterface $type)
    {
        $typeExtensions = [];
        $parentType = $type->getParent();
        $class = get_class($type);

        foreach ($this->extensions as $extension) {
            $typeExtensions = array_merge(
                $typeExtensions,
                $extension->getFilterTypeExtensions($class)
            );
        }

        return $this->resolvedTypeFactory->createResolvedFilterType(
            $type,
            $typeExtensions,
            $parentType ? $this->getFilterType($parentType) : null
        );
    }
1069489
protected function getDefaultInputDefinition()
    {
        return new InputDefinition(array(
            new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'),
            new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'),
            new InputOption('--verbose', '-v', InputOption::VALUE_NONE, 'Increase verbosity of messages.'),
            new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version.'),
            new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'),
            new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.'),
            new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question.'),
            new InputOption('--config', '-c', InputOption::VALUE_REQUIRED, 'Path to a configuration file'),
            new InputOption('--profile', '-p', InputOption::VALUE_REQUIRED, 'Chosen configuration profile'),
            new InputOption('--bootstrap', '-b', InputOption::VALUE_REQUIRED, 'A php bootstrap file'),
        ));
    }
200082
protected function getFilter()
    {
        $supports = $this->supports();
        $filters = $this->entityManager->getFilters()->getEnabledFilters();
        $fFilter = null;

        foreach ($filters as $name => $filter) {
            if ($filter instanceof $supports) {
                $fFilter = $filter;

                break;
            }
        }

        return $fFilter;
    }
809461
public function getFilter()
    {
        if (false === $this->filter) {
            return '';
        }
        if (is_array($this->filter)) {
            return Form::get()->select($this->dataProvider->filtersKey . '[' . $this->name . ']', $this->filter, null, array(), '');
        }
        
        if (is_string($this->filter) && (strlen($this->filter) > 10)){
            return $this->filter;
        }
        
        return Form::get()->input($this->dataProvider->filtersKey . '[' . $this->name . ']');
    }
1176035
protected function getUserAnnouncementsFilter(string $filter = null)
    {
        $mappingConfiguration = new PropertyMappingConfiguration();
        return $this->convertAnnouncementsFilter($mappingConfiguration, $filter);
    }
1258439
public function getFilter($filter)
    {
        if (!$filter instanceof AnFilterAbstract) {
            $filter = (string) $filter;

            if (!isset($this->_filters[$filter])) {
                if (is_string($filter) && strpos($filter, '.') === false) {
                    $identifier = clone $this->getIdentifier();
                    $identifier->path = array('filter');
                    $identifier->name = $filter;
                    register_default(array('identifier' => $identifier, 'prefix' => $this));
                } else {
                    $identifier = $this->getIdentifier($filter);
                }

                $this->_filters[$filter] = $this->getService($identifier);
            }

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

        return $filter;
    }
1109780
public function getFilteredSet(PluginDefinitionFilterInterface ...$filters) : PluginDefinitionSet {
    $set = $this->set;
    foreach ($filters as $filter) {
      $set = array_filter($set, [$filter, 'filter']);
    }
    $new_set = new PluginDefinitionSet(...array_values($set));
    return $new_set;
  }
1125803
private function processFilterDefinition()
    {
        if (isset($this->definition['filter'])) {
            
            if (is_array($this->definition['filter'])) {
                
                if (! count($this->definition['filter']) == 2) {
                    Throw new QueryBuilderException('Querybuilder needs two elements when filter is set as array. The first element has to be the filter statement. The second one an assoc array with filter parameters');
                }
                
                $array = new IsAssoc($this->definition['filter'][1]);
                
                if (! $array->isAssoc()) {
                    Throw new QueryBuilderException('Querybuilder needs an assoc array as filter parameter list.');
                }
                
                $this->filter = $this->definition['filter'][0];
                
                // Set params
                $this->setParameter($this->definition['filter'][1]);
            } else {
                $this->filter = $this->definition['filter'];
            }
        }
    }
92824
public function getInputType()
    {
        switch (true) {
            case $this->callback instanceof Closure:
                return self::CLOSURE_TYPE;

            case is_callable($this->callback, false):
                return self::CALLABLE_TYPE;

            case is_string($this->callback):
                return self::SELF_METHOD_TYPE;
        }

        throw new InvalidCallbackException(
            "The input provided for Callback filter is not supported or the callable not valid.
            Please refer to the class documentation."
        );
    }
429988
public function add($input, $name = null, $recursive = false)
    {
        if (is_array($input)
            || ($input instanceof Traversable && !$input instanceof InputFilterInterface)
        ) {
            $factory = $this->getFactory();
            $input = $factory->createInput($input);
        }

        if (!$input instanceof InputInterface && !$input instanceof ZendInputFilterInterface) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects an instance of %s or %s as its first argument; received "%s"',
                __METHOD__,
                InputInterface::class,
                ZendInputFilterInterface::class,
                (is_object($input) ? get_class($input) : gettype($input))
            ));
        }

        if ($input instanceof InputInterface && (empty($name) || is_int($name))) {
            $name = $input->getName();
        }

        if (isset($this->inputs[$name]) &&
            ($this->inputs[$name] instanceof InputInterface
                || ($recursive && $this->inputs[$name] instanceof ZendInputFilterInterface))
        ) {
            // The element already exists, so merge the config. Please note
            // that this merges the new input into the original.
            $original = $this->inputs[$name];
            if ($original !== $input) {
                $original->merge($input, $recursive);
            }
        } else {
            $this->inputs[$name] = $input;
        }

        if ($input instanceof InputInterface || $input instanceof InputFilterInterface) {
            $filter = $input->getFilterChain();
            $this->bindClosureFilter($filter);
        }

        return $this;
    }
799073
protected function getDefaultFunctionariesFilter()
    {
        $filter = new FunctionariesFilter();
        $filter->setInsideAssociationID($this->arguments[self::ARGUMENT_INSIDEASSOCIATIONID]);

        return $filter;
    }
1106068
public function getFilterPreselect()
    {
        // get definitions from plugin settings
        // and proceed only when preselectedFilter was not set
        // this reduces the amount of sql queries, too
        if ($this->conf['preselected_filters'] && count($this->preselectedFilter) == 0) {
            $preselectedArray = GeneralUtility::trimExplode(',', $this->conf['preselected_filters'], true);
            foreach ($preselectedArray as $option) {
                $option = intval($option);
                $queryBuilder = Db::getQueryBuilder('tx_kesearch_filters');
                $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
                $filterRows = $queryBuilder
                    ->add(
                        'select',
                        '`tx_kesearch_filters`.`uid` AS filteruid, `tx_kesearch_filteroptions`.`uid` AS optionuid, `tx_kesearch_filteroptions`.`tag`'
                    )
                    ->from('tx_kesearch_filters')
                    ->from('tx_kesearch_filteroptions')
                    ->add(
                        'where',
                        'FIND_IN_SET("' . $option . '",tx_kesearch_filters.options)'
                        . ' AND `tx_kesearch_filteroptions`.`uid` = ' . $option
                        . $pageRepository->enableFields('tx_kesearch_filters')
                        . $pageRepository->enableFields('tx_kesearch_filteroptions')
                    )
                    ->execute()
                    ->fetchAll();

                foreach ($filterRows as $row) {
                    $this->preselectedFilter[$row['filteruid']][$row['optionuid']] = $row['tag'];
                }
            }
        }
    }
302903
public function getInputName()
    {
        $key = $this->grid->getInputProcessor()->getKey();
        $name = $this->config->getId();
        return "{$key}[filters][{$name}]";
    }
288669
public function filter($value)
    {
        /** @var InputFilterInterface $filter */
        foreach ($this->filters as $filter) {
            if (true === is_array($value)) {
                $values = array();
                foreach ($value as $child) {
                    if (null !== $filtered = $filter->filter($child)) {
                        $values[] = $filtered;
                    }
                }
                $value = $values;
            } else {
                $value = $filter->filter($value);
            }
        }

        return $value;
    }
643528
public function getInputFilter($inputFilter = null)
    {
        $inputFilter        = $inputFilter ?? $this->inputFilter ?? $this->serviceAlias;
        $sl                 = $this->getServiceLocator();
        $inputFilterManager = $sl->get('InputFilterManager');
        $inputFilter        = $inputFilterManager->get($inputFilter);

        return $inputFilter;
    }