response = $response; } public function setStatus(int $code, ?string $reason = null) { $this->response = $this->response->withStatus($code, $reason ?? ''); } public function setHeader(string $name, string $value) { $this->response = $this->response->withHeader($name, $value); } public function getResponse() : Psr7Response { return $this->response; } public function writeBody(string $string) { $this->response->getBody()->write($string); } public function setBody(StreamInterface $body) { $this->response->setBody($body); } }