_exception_class = get_class($exception); $this->_exception_code = $exception->getCode(); $this->_error_message = $exception->getMessage(); } /** * Methods to implement ResponseInterface. */ public function getStatusCode(): int { return 0; } public function getReasonPhrase(): string { return $this->_error_message; } public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface { $new = clone $this; $new->_error_message = $reasonPhrase; return $new; } }