Max F 5 anos atrás
pai
commit
6306e36119

+ 0 - 1
src/App/Middlewares/MinimifierHtml.php

@@ -28,7 +28,6 @@ class MinimifierHtml
         
         $content_type = $response->getContentType();
         $content_type_short = explode(';', $content_type)[0];
-//pre($response->getContentType(), 1, 'content_type:');
 
         if ($content_type_short !== 'text/html') {
             return $response;

+ 0 - 44
src/App/ResponseError.php

@@ -1,44 +0,0 @@
-<?php
-
-namespace KarmaFW\App;
-
-throw new \Exception("DEPRECATED", 1);
-
-class ResponseError extends Response
-{
-	protected $status = 500;
-	protected $reasonPhrase = 'Server Error';
-
-
-	public function __construct($body=null, $status=500, $headers=[], $content_type='text/html')
-	{
-		parent::__construct($status, $headers, $body);
-
-		$this->setContentType($content_type);
-
-		/*
-		if (is_null($body)) {
-			$this->body = '<html>';
-			$this->body .= '<head><title>' . $this->status . " " . $this->reasonPhrase . '</title></head>';
-			$this->body .= '<body>';
-			$this->body .= '<h1>' . $this->status . " " . $this->reasonPhrase . '</h1>';
-			$this->body .= '</body>';
-			$this->body .= '</html>';
-		}
-		*/
-	}
-
-	public function getDefaultBody()
-	{
-		$body = '<html>';
-		$body .= '<head><title>' . $this->status . " " . $this->reasonPhrase . '</title></head>';
-		$body .= '<body>';
-		$body .= '<h1>Error ' . $this->status . " : " . $this->reasonPhrase . '</h1>';
-		$body .= '</body>';
-		$body .= '</html>';
-
-		return $body;
-	}
-
-
-}

+ 0 - 18
src/App/ResponseError404.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace KarmaFW\App;
-
-throw new \Exception("DEPRECATED", 1);
-
-class ResponseError404 extends ResponseError
-{
-	protected $status = 404;
-	protected $reasonPhrase = 'Not Found';
-
-
-	public function __construct($body=null, $headers=[], $content_type='text/html')
-	{
-		parent::__construct($body, $this->status, $headers, $content_type);
-	}
-
-}

+ 1 - 1
src/App/ResponseFile.php

@@ -12,7 +12,7 @@ class ResponseFile extends Response
 
 	public function __construct($file_path, $status=200)
 	{
-		parent::__construct('', $status);
+		parent::__construct($status);
 
 		$this->file_path = $file_path;
 	}

+ 0 - 18
src/App/ResponseHtml.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace KarmaFW\App;
-
-throw new \Exception("DEPRECATED", 1);
-
-
-class ResponseHtml extends Response
-{
-
-	public function __construct($body=null, $status=200, $headers=[], $content_type='text/html')
-	{
-		parent::__construct($status, $headers, $body);
-
-		$this->setContentType($content_type);
-	}
-
-}

+ 0 - 18
src/App/ResponseText.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace KarmaFW\App;
-
-throw new \Exception("DEPRECATED", 1);
-
-
-class ResponseHtml extends ResponseThrowable
-{
-
-	public function __construct($body=null, $status=200, $headers=[], $content_type='text/plain')
-	{
-		parent::__construct($status, $headers, $body);
-
-		$this->setContentType($content_type);
-	}
-
-}