protected function _loadFilter($name, $filter, array $options = [])
    {
        if (empty($options['className'])) {
            $class = $filter;
        } else {
            $class = $options['className'];
            unset($options['className']);
        }

        $className = App::className($class, 'Model/Filter');
        if (!$className) {
            throw new InvalidArgumentException(sprintf('Search filter "%s" was not found.', $class));
        }

        return new $className($name, $this->_manager, $options);
    }
protected function _loadFilter($name, $filter, array $options = [])
    {
        if (empty($options['className'])) {
            $class = $filter;
        } else {
            $class = $options['className'];
            unset($options['className']);
        }

        $className = App::className($class, 'Model/Filter');
        if (!$className) {
            throw new InvalidArgumentException(sprintf('Search filter "%s" was not found.', $class));
        }

        return new $className($name, $this->_manager, $options);
    }
protected function _loadFilter ( $ name , $ filter , array $ options = [ ] ) { if ( empty ( $ options [ 'className' ] ) ) { $ class = $ filter ; } else { $ class = $ options [ 'className' ] ; unset ( $ options [ 'className' ] ) ; } $ className = App :: className ( $ class , 'Model/Filter' ) ; if ( ! $ className ) { throw new InvalidArgumentException ( sprintf ( 'Search filter "%s" was not found.' , $ class ) ) ; } return new $ className ( $ name , $ this -> _manager , $ options ) ; }
Loads a search filter.

@param string $name Filter name.
@param string $filter Filter class name in short form like "Search.Value" or FQCN.
@param array $options Filter options.
@return \Search\Model\Filter\Base
@throws \InvalidArgumentException When no filter was found.
Loads a search filter .