Refactored HttpExceptions.

This commit is contained in:
Dmitry Khomutov 2018-03-04 17:14:09 +07:00
commit aadfabd714
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
27 changed files with 54 additions and 57 deletions

View file

@ -1,40 +0,0 @@
<?php
namespace b8\Exception;
class HttpException extends \Exception
{
/**
* @var integer
*/
protected $errorCode = 500;
/**
* @var string
*/
protected $statusMessage = 'Internal Server Error';
/**
* @return integer
*/
public function getErrorCode()
{
return $this->errorCode;
}
/**
* @return string
*/
public function getStatusMessage()
{
return $this->statusMessage;
}
/**
* @return string
*/
public function getHttpHeader()
{
return 'HTTP/1.1 ' . $this->errorCode . ' ' . $this->statusMessage;
}
}