private function dispatch($eventName, $controller = null, $type = self::MASTER_REQUEST, $stopWithResponse = true)
    {
        if (null === $this->application) {
            return;
        }

        if (null !== $this->application->getEventDispatcher()) {
            $event = new GetResponseEvent(null === $controller ? $this : $controller, $this->getRequest(), $type);
            $this->application->getEventDispatcher()->dispatch($eventName, $event);

            if ($stopWithResponse && $event->hasResponse()) {
                $this->send($event->getResponse());
            }
        }
    }
private function dispatch($eventName, $controller = null, $type = self::MASTER_REQUEST, $stopWithResponse = true)
    {
        if (null === $this->application) {
            return;
        }

        if (null !== $this->application->getEventDispatcher()) {
            $event = new GetResponseEvent(null === $controller ? $this : $controller, $this->getRequest(), $type);
            $this->application->getEventDispatcher()->dispatch($eventName, $event);

            if ($stopWithResponse && $event->hasResponse()) {
                $this->send($event->getResponse());
            }
        }
    }
private function dispatch ( $ eventName , $ controller = null , $ type = self :: MASTER_REQUEST , $ stopWithResponse = true ) { if ( null === $ this -> application ) { return ; } if ( null !== $ this -> application -> getEventDispatcher ( ) ) { $ event = new GetResponseEvent ( null === $ controller ? $ this : $ controller , $ this -> getRequest ( ) , $ type ) ; $ this -> application -> getEventDispatcher ( ) -> dispatch ( $ eventName , $ event ) ; if ( $ stopWithResponse && $ event -> hasResponse ( ) ) { $ this -> send ( $ event -> getResponse ( ) ) ; } } }
Dispatches GetResponseEvent.

@access private

@param string  $eventName        The name of the event to dispatch
@param integer $type             The type of the request
(one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST)
@param boolean $stopWithResponse Send response if TRUE and response exists
Dispatches GetResponseEvent .