php-censor/src/B8Framework/Exception/HttpException.php
2017-11-08 20:45:18 +07:00

41 lines
645 B
PHP

<?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;
}
}