public function addFilter(EventListenerInterface $filter)
    {
        deprecationWarning(
            'ActionDispatcher::addFilter() is deprecated. ' .
            'This is only available for backwards compatibility with DispatchFilters'
        );

        $this->filters[] = $filter;
        $this->getEventManager()->on($filter);
    }
public function addFilter(EventListenerInterface $filter)
    {
        deprecationWarning(
            'ActionDispatcher::addFilter() is deprecated. ' .
            'This is only available for backwards compatibility with DispatchFilters'
        );

        $this->filters[] = $filter;
        $this->getEventManager()->on($filter);
    }
public function addFilter ( EventListenerInterface $ filter ) { deprecationWarning ( 'ActionDispatcher::addFilter() is deprecated. ' . 'This is only available for backwards compatibility with DispatchFilters' ) ; $ this -> filters [ ] = $ filter ; $ this -> getEventManager ( ) -> on ( $ filter ) ; }
Add a filter to this dispatcher.

The added filter will be attached to the event manager used
by this dispatcher.

@param \Cake\Event\EventListenerInterface $filter The filter to connect. Can be
any EventListenerInterface. Typically an instance of \Cake\Routing\DispatcherFilter.
@return void
@deprecated This is only available for backwards compatibility with DispatchFilters
Add a filter to this dispatcher .