php-censor/src/B8Framework/Exception/HttpException.php
2017-01-14 16:12:53 +07:00

25 lines
462 B
PHP

<?php
namespace b8\Exception;
class HttpException extends \Exception
{
protected $errorCode = 500;
protected $statusMessage = 'Internal Server Error';
public function getErrorCode()
{
return $this->errorCode;
}
public function getStatusMessage()
{
return $this->statusMessage;
}
public function getHttpHeader()
{
return 'HTTP/1.1 ' . $this->errorCode . ' ' . $this->statusMessage;
}
}