LazyResponseException example

public function __construct(parent $event)
    {
        $this->event = $event;
    }

    public function setResponse(Response $response): never
    {
        $this->stopPropagation();
        $this->event->stopPropagation();

        throw new LazyResponseException($response);
    }

    public function getKernel(): HttpKernelInterface
    {
        return $this->event->getKernel();
    }

    public function getRequest(): Request
    {
        return $this->event->getRequest();
    }

    
Home | Imprint | This part of the site doesn't use cookies.