public function getMatchedRoutes($httpMethod, $resourceUri, $reload = false)
    {
        if ($reload || is_null($this->matchedRoutes)) {
            $this->matchedRoutes = array();
            foreach ($this->routes as $route) {
                if (!$route->supportsHttpMethod($httpMethod)) {
                    continue;
                }

                if ($route->matches($resourceUri)) {
                    $this->matchedRoutes[] = $route;
                }
            }
        }

        return $this->matchedRoutes;
    }
public function getMatchedRoutes($httpMethod, $resourceUri, $reload = false)
    {
        if ($reload || is_null($this->matchedRoutes)) {
            $this->matchedRoutes = array();
            foreach ($this->routes as $route) {
                if (!$route->supportsHttpMethod($httpMethod)) {
                    continue;
                }

                if ($route->matches($resourceUri)) {
                    $this->matchedRoutes[] = $route;
                }
            }
        }

        return $this->matchedRoutes;
    }
public function getMatchedRoutes ( $ httpMethod , $ resourceUri , $ reload = false ) { if ( $ reload || is_null ( $ this -> matchedRoutes ) ) { $ this -> matchedRoutes = array ( ) ; foreach ( $ this -> routes as $ route ) { if ( ! $ route -> supportsHttpMethod ( $ httpMethod ) ) { continue ; } if ( $ route -> matches ( $ resourceUri ) ) { $ this -> matchedRoutes [ ] = $ route ; } } } return $ this -> matchedRoutes ; }
Return route objects that match the given HTTP method and URI
@param  string               $httpMethod   The HTTP method to match against
@param  string               $resourceUri  The resource URI to match against
@param  bool                 $reload       Should matching routes be re-parsed?
@return array[\Slim\Route]
Return route objects that match the given HTTP method and URI