dispatch() 공개 메소드

Dispatch a request in the router.
public dispatch ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
리턴 Symfony\Component\HttpFoundation\Response
예제 #1
0
 protected function innerHandle(Request $request, $type)
 {
     $this->requests->push($request);
     if ($this->eventDispatcher !== null) {
         $event = new GetResponseEvent($this, $request, $type);
         $this->eventDispatcher->dispatch(KernelEvents::REQUEST, $event);
         $response = $event->getResponse() ?: $this->router->dispatch($request);
     } else {
         $response = $this->router->dispatch($request);
     }
     return $this->filterResponse($response, $request, $type);
 }