From 79aa1988d802815e417891d68e58f8c9be99afc5 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 10 Apr 2016 11:55:17 +0100 Subject: [PATCH] Removed HtmlResponse --- src/ResponseTypes/HtmlResponse.php | 66 ------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 src/ResponseTypes/HtmlResponse.php diff --git a/src/ResponseTypes/HtmlResponse.php b/src/ResponseTypes/HtmlResponse.php deleted file mode 100644 index 11a92b9c..00000000 --- a/src/ResponseTypes/HtmlResponse.php +++ /dev/null @@ -1,66 +0,0 @@ -html = $html; - } - - /** - * @param int $statusCode - */ - public function setStatusCode($statusCode = 200) - { - $this->statusCode = $statusCode; - } - - /** - * @param ResponseInterface $response - * - * @return ResponseInterface - */ - public function generateHttpResponse(ResponseInterface $response) - { - $response->getBody()->write($this->html); - - foreach ($this->headers as $key => $value) { - $response = $response->withHeader($key, $value); - } - - return $response - ->withStatus($this->statusCode) - ->withHeader('content-type', 'text/html'); - } - - /** - * @param string $key - * @param string $value - */ - public function setHeader($key, $value) - { - $this->headers[$key] = $value; - } -}