public function removeFilter($indexOrFilter) {
        if (is_scalar($indexOrFilter)) {
            unset($this->filters[$indexOrFilter]);
        } else if ($indexOrFilter instanceof FilterInterface) {
            foreach ($this->filters as $i => $filter) {
                if ($filter === $indexOrFilter) {
                    unset($this->filters[$i]);
                }
            }
        }
        return $this;
    }