public function terminate()
    {
        if (!$this->application || false === $this->application->isStarted()) {
            return;
        }

        ob_implicit_flush(true);
        flush();

        // $response may not be set
        if ($this->response instanceof Response) {
            $this->application->getEventDispatcher()->dispatch(
                KernelEvents::TERMINATE,
                new PostResponseEvent($this, $this->getRequest(), $this->response)
            );
        }
    }
public function terminate()
    {
        if (!$this->application || false === $this->application->isStarted()) {
            return;
        }

        ob_implicit_flush(true);
        flush();

        // $response may not be set
        if ($this->response instanceof Response) {
            $this->application->getEventDispatcher()->dispatch(
                KernelEvents::TERMINATE,
                new PostResponseEvent($this, $this->getRequest(), $this->response)
            );
        }
    }
public function terminate ( ) { if ( ! $ this -> application || false === $ this -> application -> isStarted ( ) ) { return ; } ob_implicit_flush ( true ) ; flush ( ) ; // $response may not be set if ( $ this -> response instanceof Response ) { $ this -> application -> getEventDispatcher ( ) -> dispatch ( KernelEvents :: TERMINATE , new PostResponseEvent ( $ this , $ this -> getRequest ( ) , $ this -> response ) ) ; } }
This method executed on shutdown after the response is sent.
This method executed on shutdown after the response is sent .