public function ensure(FilterInterface $filter)
    {
        if ($filter instanceof \Traversable) {
            foreach ($filter as $f) {
                $this->ensure($f);
            }
        } elseif (!in_array($filter, $this->filters, true)) {
            $this->filters[] = $filter;
        }
    }
public function ensure(FilterInterface $filter)
    {
        if ($filter instanceof \Traversable) {
            foreach ($filter as $f) {
                $this->ensure($f);
            }
        } elseif (!in_array($filter, $this->filters, true)) {
            $this->filters[] = $filter;
        }
    }
public function ensure ( FilterInterface $ filter ) { if ( $ filter instanceof \ Traversable ) { foreach ( $ filter as $ f ) { $ this -> ensure ( $ f ) ; } } elseif ( ! in_array ( $ filter , $ this -> filters , true ) ) { $ this -> filters [ ] = $ filter ; } }
Checks that the current collection contains the supplied filter.

If the supplied filter is another filter collection, each of its
filters will be checked.
Checks that the current collection contains the supplied filter .