Refactored structure
This commit is contained in:
parent
963225382c
commit
e5164ae1dd
329 changed files with 277 additions and 457 deletions
24
src/B8Framework/Exception/HttpException.php
Executable file
24
src/B8Framework/Exception/HttpException.php
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
<?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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue