public function findMatchingRoute(RequestInterface $request)
 {
     $arr_match_types = Route::getPathsByRouteType($request);
     $stored_routing_table = apc_fetch(self::APC_CACHE_INDEX);
     if (!is_array($stored_routing_table)) {
         $stored_routing_table = array();
     }
     $arr_allowed_methods = array();
     foreach ($stored_routing_table as $route) {
         foreach ($arr_match_types as $route_type => $route_match) {
             if ($route->getRouteHttpMethod() == $request->getMethod() && $route->getRouteType() == $route_type && preg_match($route->getRouteRegex(), $route_match)) {
                 return $route;
             } else {
                 if ($route->getRouteType() == $route_type && preg_match($route->getRouteRegex(), $route_match)) {
                     $arr_allowed_methods[] = $route->getRouteHttpMethod();
                 }
             }
         }
     }
     // No match found
     if (!empty($arr_allowed_methods)) {
         // If there's a match on this URL, just not for the given HTTP method, return a 405
         throw new ExceptionMethodNotAllowed($arr_allowed_methods);
     } else {
         // Else this URL has no resource at all.  Return a 404
         throw new ExceptionNotFound();
     }
 }