/**
  * Match a given request. Run Symfony if it wants the route.
  *
  * @param  Request $request
  * @return RouteMatch|null
  */
 public function match(Request $request)
 {
     try {
         self::$routeCollection->match($request->getUri()->getPath());
     } catch (ResourceNotFoundException $e) {
         return null;
     }
     $dispatcher = new SymfonyDispatcher();
     $dispatcher->dispatchRouteToSymfony();
 }
Exemple #2
0
 /**
  * Match a given request.
  *
  * @param  Request $request
  * @return RouteMatch|null
  */
 public function match(Request $request)
 {
     try {
         //This line is odd but prevents a warning
         //            self::$routeCollection->request = $request;
         $params = self::$routeCollection->match($request->getUri()->getPath());
     } catch (ResourceNotFoundException $e) {
         return null;
     }
     $dispatcher = new SymfonyDispatcher();
     $dispatcher->dispatchRouteToSymfony($params);
 }