php-censor/src/B8Framework/Exception/HttpException.php

24 lines
406 B
PHP
Raw Normal View History

2016-04-12 19:31:39 +02:00
<?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;
}
}