Exemplo n.º 1
0
 /**
  * Dispatch FilterResponseEvent then send response.
  *
  * @acces private
  *
  * @param Response $response The response to filter then send
  * @param integer  $type     The type of the request
  *                           (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST)
  */
 private function send(Response $response, $type = self::MASTER_REQUEST)
 {
     if (null !== $this->application && null !== $this->application->getEventDispatcher()) {
         $event = new FilterResponseEvent($this, $this->getRequest(), $type, $response);
         $this->application->getEventDispatcher()->dispatch('frontcontroller.response', $event);
         $this->application->getEventDispatcher()->dispatch(KernelEvents::RESPONSE, $event);
     }
     $response->send();
     $this->response = $response;
     $this->application->stop();
 }
Exemplo n.º 2
0
 /**
  * Stop the current BBApplication instance.
  *
  * @{inheritdoc}
  * @return void
  */
 public function stop()
 {
     parent::stop();
     exit;
 }