src/Routing/Dispatcher.php
protected function match($method, $uri)
    {
        $result = null;

        foreach ((array) $this->router->routes() as $route)
        {
            $matched = preg_match($route->regex(), $uri, $matches);

            if ($matched && $route->method() === $method)
            {
                return array($matches, $route);
            }
        }

        return $result;
    }
protected function match($method, $uri)
    {
        $result = null;

        foreach ((array) $this->router->routes() as $route)
        {
            $matched = preg_match($route->regex(), $uri, $matches);

            if ($matched && $route->method() === $method)
            {
                return array($matches, $route);
            }
        }

        return $result;
    }
protected function match ( $ method , $ uri ) { $ result = null ; foreach ( ( array ) $ this -> router -> routes ( ) as $ route ) { $ matched = preg_match ( $ route -> regex ( ) , $ uri , $ matches ) ; if ( $ matched && $ route -> method ( ) === $ method ) { return array ( $ matches , $ route ) ; } } return $ result ; }
Matches the route from the parsed URI.

@param  string $method
@param  string $uri
@return array|null
Matches the route from the parsed URI .