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();
    }
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();
    }
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 ( ) ; }
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)
Dispatch FilterResponseEvent then send response .