public function getFilters()
    {
        $filters = [];

        $names = explode('_', $this->name);
        $base = '';
        $filters = [];
        while ($name = array_shift($names)) {
            $filter = $this->_searchInControllerDir($base, 'filter.yml');
            if ($filter) $filters[] = $filter;

            // when has rest.
            if (count($names) > 0) {
                $base = $base . DS . ucfirst($name);

            // when last.
            } else {
                $filter = $this->_searchInControllerDir($base, "{$name}.filter.yml");
                if ($filter) $filters[] = $filter;
            }
        }

        return $filters;
    }
public function getFilters()
    {
        $filters = [];

        $names = explode('_', $this->name);
        $base = '';
        $filters = [];
        while ($name = array_shift($names)) {
            $filter = $this->_searchInControllerDir($base, 'filter.yml');
            if ($filter) $filters[] = $filter;

            // when has rest.
            if (count($names) > 0) {
                $base = $base . DS . ucfirst($name);

            // when last.
            } else {
                $filter = $this->_searchInControllerDir($base, "{$name}.filter.yml");
                if ($filter) $filters[] = $filter;
            }
        }

        return $filters;
    }
public function getFilters ( ) { $ filters = [ ] ; $ names = explode ( '_' , $ this -> name ) ; $ base = '' ; $ filters = [ ] ; while ( $ name = array_shift ( $ names ) ) { $ filter = $ this -> _searchInControllerDir ( $ base , 'filter.yml' ) ; if ( $ filter ) $ filters [ ] = $ filter ; // when has rest. if ( count ( $ names ) > 0 ) { $ base = $ base . DS . ucfirst ( $ name ) ; // when last. } else { $ filter = $ this -> _searchInControllerDir ( $ base , "{$name}.filter.yml" ) ; if ( $ filter ) $ filters [ ] = $ filter ; } } return $ filters ; }
Get filter paths

1. Controller/filter.yml
2. Controller/foo.filter.yml
Get filter paths