private function match($request)
    {
        $route = $this->router->match(
            $request->getUri()->getPath(),
            $request->getMethod()
        );
        if (!$route) {
            // not matched. dispatch the next middleware.
            return $this->next ? $this->next->__invoke($request) : null;
        }
        return $this->dispatch($request, $route);
    }
private function match($request)
    {
        $route = $this->router->match(
            $request->getUri()->getPath(),
            $request->getMethod()
        );
        if (!$route) {
            // not matched. dispatch the next middleware.
            return $this->next ? $this->next->__invoke($request) : null;
        }
        return $this->dispatch($request, $route);
    }
private function match ( $ request ) { $ route = $ this -> router -> match ( $ request -> getUri ( ) -> getPath ( ) , $ request -> getMethod ( ) ) ; if ( ! $ route ) { // not matched. dispatch the next middleware. return $ this -> next ? $ this -> next -> __invoke ( $ request ) : null ; } return $ this -> dispatch ( $ request , $ route ) ; }
matches the route!

@param Request $request
@return null|Response
matches the route!