/** * Send the response content. * * Sets the composed ApiProblem's flag for including the stack trace in the * detail based on the display exceptions flag, and then sends content. * * @param SendResponseEvent $e * * @return self */ public function sendContent(SendResponseEvent $e) { $response = $e->getResponse(); if (!$response instanceof ApiProblemResponse) { return $this; } $response->getApiProblem()->setDetailIncludesStackTrace($this->displayExceptions()); return parent::sendContent($e); }