statusCode = $statusCode; $this->setHeaders($headers); $this->body = Stream::create($body); $this->protocolVersion = $protocolVersion; $this->reasonPhrase = $reasonPhrase; } public function getStatusCode() { return $this->statusCode; } public function withStatus($code, $reasonPhrase = '') { $response = clone $this; $response->statusCode = $code; $response->reasonPhrase = $reasonPhrase; return $response; } public function getReasonPhrase() { return $this->reasonPhrase; } }