public function filter(callable $filter, callable $controller)
    {
        $pattern = $this->getFrontController()->addController(':all', $controller)->getPattern();
        $pattern->addFilter($filter);
        return new IRoutePatternSetterAdapter($pattern);
    }
public function filter(callable $filter, callable $controller)
    {
        $pattern = $this->getFrontController()->addController(':all', $controller)->getPattern();
        $pattern->addFilter($filter);
        return new IRoutePatternSetterAdapter($pattern);
    }
public function filter ( callable $ filter , callable $ controller ) { $ pattern = $ this -> getFrontController ( ) -> addController ( ':all' , $ controller ) -> getPattern ( ) ; $ pattern -> addFilter ( $ filter ) ; return new IRoutePatternSetterAdapter ( $ pattern ) ; }
Adds a controller with a special filter.
This filter receive the current Request as first param.

@param callable $filter
@param callable $controller
@return IRoutePatternSetter
Adds a controller with a special filter . This filter receive the current Request as first param .