{@inheritdoc}

@param string          $name
@param string|callable $forwardFilter (optional)

@return self
779500
public function addBus($name, $forward=null)
    {
        if ($this->name != 'default') {
            return $this->root->addBus($name);
        }

        if ($name == 'default') {
            throw new LogicException('You cannot add a bus named "default"');
        }

        if (isset($this->buses[$name])) {
            throw new OverflowException("A Bus named '$name' already exists. Remove it first before adding a new one with this name.");
        }

        $this->buses[$name] = new static($this->matchingListener, $name, $this);

        return $this->buses[$name];

    }
338904
private function getFilterClass($name)
	{
		if (isset($this->extensions[$name]))
			return $this->extensions[$name];

		if (class_exists($class = 'Sprockets\Filter\\' . ucfirst($name)))
			return $class;

		return false;
	}
184907
private function filterParams($name)
    {
        if (empty($this->options[$name])) {
            return;
        }

        if (is_array($this->options['params_filters'])) {
            foreach ($this->options['params_filters'] as $pattern) {
                foreach ($this->options[$name] as $key => $value) {

                    if (preg_match($pattern, $key)) {
                        $this->options[$name][$key] = '[FILTERED]';
                    }
                }
            }
        }
    }
1006729
public function whereIn($name, $value = [])
    {

        if (is_callback_function($name)) {
            $name($this);
            return $this;
        }

        $this->filter[] = ["terms" => [$name => $value]];

        return $this;
    }
1008470
public static function passive(string $name): self
    {
        $self = new self;
        $self->passive = true;

        return $self->withName($name);
    }
6554
public function getFilterFactoryByName(string $name): FilterFactoryInterface
    {
        if (!isset($this->filterFactories[$name])) {
            throw new NotFoundException(sprintf("Filter factory with name '%s' was not found.", $name));
        }

        return $this->filterFactories[$name];
    }
45126
private function getFilter($name)
    {
        if (!$this->hasFilter($name)) {
            throw new FilterNotFoundException($name);
        }

        return $this->filters[$name];
    }
255194
public function setFilter($name, $filter)
    {
        if (!(
            is_callable($filter) ||
            class_exists($filter) ||
            method_exists($filter, 'parse')
        )) {
            throw new InvalidArgumentException(
                'Invalid ' . $name . ' filter given: ' .
                'it must be a callable or a class name.'
            );
        }

        return $this->getCompiler()->setFilter($name, $filter);
    }
78516
public function add($name, $filter, array $options = [])
    {
        $this->_filters[$name] = $this->_loadFilter($name, $filter, $options);

        return $this;
    }
1046730
public function getFilter($name)
    {
        $filter = $this->getCompiler()->getFilter($name);
        if (is_string($filter) && !function_exists($filter) && class_exists($filter)) {
            $filter = new $filter();
        }

        return $filter;
    }
1003626
public function addFilter(BuilderInterface $filter, $name = '')
    {
        if ($this->anonymous === false && empty($name)) {
            throw new \LogicException('In not anonymous filters filter name must be set.');
        } elseif ($this->anonymous === false && !empty($name)) {
            $this->filters['filters'][$name] = $filter->toArray();
        } else {
            $this->filters['filters'][] = $filter->toArray();
        }

        return $this;
    }
1209254
public function filter($filter)
    {
        if (!is_a($filter, FilterBuilder::class)) {
            throw new \Exception ("Filter must be extend class 'FilterBuilder'");
        }

        $this->filter = $filter;

        return $this;
    }
563723
public function getFilter($name)
    {
        if (isset($this->filters[$name])) {
            return $this->filters[$name];
        } else {
            return null;
        }
    }
1345549
public function filter($filter)
    {
        if (is_array($filter)) {
            $filter = new GridFilter($filter);
        }

        if ($filter instanceof FilterSpecification) {
            $filter = new GridFilter($filter->asFilter());
        }

        $this->filter = $filter;

        return $this;
    }
617162
protected function createFilterArray($name)
    {
        $config = $this->getConfig($name, 'filters', array());
        $filters = array();
        foreach ($config as $filter) {
            $filters[] = $this->filters->get($filter);
        }

        return $filters;
    }
580478
public function setDefaultFilter($name)
    {
        if (!\array_key_exists($name, $this->filters)) {
            throw new \InvalidArgumentException(sprintf('Cannot set default exception filter "%s". It does not exist.', $name));
        }

        $this->defaultFilter = $name;
    }
27120
public function getFilter($name)
    {
        foreach ($this->filters as $filter) {
            if ($filter->getFieldName() === $name) {
                return $filter;
            }
        }
        
        return false;
    }