src/Matcher.php
public function match($httpMethod, $path)
    {
        $path = $this->parsePath($path);

        if (($route = $this->collector->findStaticRoute($httpMethod, $path)) ||
            ($route = $this->matchDynamicRoute($httpMethod, $path))) {
             $route->setMatcher($this);

            return $route;
        }

        $this->matchSimilarRoute($httpMethod, $path);
    }
public function match($httpMethod, $path)
    {
        $path = $this->parsePath($path);

        if (($route = $this->collector->findStaticRoute($httpMethod, $path)) ||
            ($route = $this->matchDynamicRoute($httpMethod, $path))) {
             $route->setMatcher($this);

            return $route;
        }

        $this->matchSimilarRoute($httpMethod, $path);
    }
public function match ( $ httpMethod , $ path ) { $ path = $ this -> parsePath ( $ path ) ; if ( ( $ route = $ this -> collector -> findStaticRoute ( $ httpMethod , $ path ) ) || ( $ route = $ this -> matchDynamicRoute ( $ httpMethod , $ path ) ) ) { $ route -> setMatcher ( $ this ) ; return $ route ; } $ this -> matchSimilarRoute ( $ httpMethod , $ path ) ; }
Find a route that matches the given arguments.

@param string $httpMethod
@param string $path

@throws NotFoundException
@throws MethodNotAllowedException

@return Route
Find a route that matches the given arguments .