protected function getRouteObject($pattern, $method)
    {
        foreach (['REDIRECT', $method, 'ANY'] as $verb) {
            if (array_key_exists($verb, $this->routes[$pattern])) {
                $index = $this->routes[$pattern][$verb];
                return $this->callbacks[$index];
            }
        }

        return false;
    }
protected function getRouteObject($pattern, $method)
    {
        foreach (['REDIRECT', $method, 'ANY'] as $verb) {
            if (array_key_exists($verb, $this->routes[$pattern])) {
                $index = $this->routes[$pattern][$verb];
                return $this->callbacks[$index];
            }
        }

        return false;
    }
protected function getRouteObject ( $ pattern , $ method ) { foreach ( [ 'REDIRECT' , $ method , 'ANY' ] as $ verb ) { if ( array_key_exists ( $ verb , $ this -> routes [ $ pattern ] ) ) { $ index = $ this -> routes [ $ pattern ] [ $ verb ] ; return $ this -> callbacks [ $ index ] ; } } return false ; }
Get matched route from pattern and method

@param  string $pattern
@param  string $method

@return object|false
Get matched route from pattern and method