public function findFromPath($path, $method = null)
    {
        foreach ($this->getRoutes() as $route) {
            if ($matchedRoute = $route->matches($path, $method)) {
                return $matchedRoute;
            }
        }
        return null;
    }
public function findFromPath($path, $method = null)
    {
        foreach ($this->getRoutes() as $route) {
            if ($matchedRoute = $route->matches($path, $method)) {
                return $matchedRoute;
            }
        }
        return null;
    }
public function findFromPath ( $ path , $ method = null ) { foreach ( $ this -> getRoutes ( ) as $ route ) { if ( $ matchedRoute = $ route -> matches ( $ path , $ method ) ) { return $ matchedRoute ; } } return null ; }
Find a route based on method and path.
@param $path
@param $method
@return MatchedRoute|null
Find a route based on method and path .