public function getMatchedRoutes($httpMethod, $resourceUri, $save = true)
    {
        $matchedRoutes = array();
        foreach ($this->routes as $route) {
            if (!$route->supportsHttpMethod($httpMethod) && !$route->supportsHttpMethod("ANY")) {
                continue;
            }

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

        if ($save === true) {
            $this->matchedRoutes = $matchedRoutes;
        }

        return $matchedRoutes;
    }
public function getMatchedRoutes($httpMethod, $resourceUri, $save = true)
    {
        $matchedRoutes = array();
        foreach ($this->routes as $route) {
            if (!$route->supportsHttpMethod($httpMethod) && !$route->supportsHttpMethod("ANY")) {
                continue;
            }

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

        if ($save === true) {
            $this->matchedRoutes = $matchedRoutes;
        }

        return $matchedRoutes;
    }
public function getMatchedRoutes ( $ httpMethod , $ resourceUri , $ save = true ) { $ matchedRoutes = array ( ) ; foreach ( $ this -> routes as $ route ) { if ( ! $ route -> supportsHttpMethod ( $ httpMethod ) && ! $ route -> supportsHttpMethod ( "ANY" ) ) { continue ; } if ( $ route -> matches ( $ resourceUri ) ) { $ matchedRoutes [ ] = $ route ; } } if ( $ save === true ) { $ this -> matchedRoutes = $ matchedRoutes ; } return $ matchedRoutes ; }
Get route objects that match a given HTTP method and URI

This method is responsible for finding and returning all \Slim\Interfaces\RouteInterface
objects that match a given HTTP method and URI. Slim uses this method to
determine which \Slim\Interfaces\RouteInterface objects are candidates to be
dispatched for the current HTTP request.

@param  string             $httpMethod  The HTTP request method
@param  string             $resourceUri The resource URI
@param  bool               $reload      Should matching routes be re-parsed?
@return array[\Slim\Interfaces\RouteInterface]
@api
Get route objects that match a given HTTP method and URI