src/Dispatcher.php
protected function finishRequest(Response $response)
    {
        $event = new FinishRequestEvent($this->app, $response);
        $this->event_dispatcher->dispatch(DietcubeEvents::FINISH_REQUEST, $event);

        $response = $event->getResponse();

        $response->sendHeaders();
        $response->sendBody();

        return $response;
    }
protected function finishRequest(Response $response)
    {
        $event = new FinishRequestEvent($this->app, $response);
        $this->event_dispatcher->dispatch(DietcubeEvents::FINISH_REQUEST, $event);

        $response = $event->getResponse();

        $response->sendHeaders();
        $response->sendBody();

        return $response;
    }
protected function finishRequest ( Response $ response ) { $ event = new FinishRequestEvent ( $ this -> app , $ response ) ; $ this -> event_dispatcher -> dispatch ( DietcubeEvents :: FINISH_REQUEST , $ event ) ; $ response = $ event -> getResponse ( ) ; $ response -> sendHeaders ( ) ; $ response -> sendBody ( ) ; return $ response ; }
Finish request and send response.

@param Response $response
@return Response
Finish request and send response .