| Total Complexity | 6 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class ZPushException extends Exception { |
||
| 11 | protected $defaultLogLevel = LOGLEVEL_FATAL; |
||
| 12 | protected $httpReturnCode = HTTP_CODE_500; |
||
| 13 | protected $httpReturnMessage = "Internal Server Error"; |
||
| 14 | protected $httpHeaders = array(); |
||
| 15 | protected $showLegal = true; |
||
| 16 | |||
| 17 | public function __construct($message = "", $code = 0, $previous = NULL, $logLevel = false) { |
||
| 18 | if (! $message) |
||
| 19 | $message = $this->httpReturnMessage; |
||
| 20 | |||
| 21 | if (!$logLevel) |
||
| 22 | $logLevel = $this->defaultLogLevel; |
||
| 23 | |||
| 24 | parent::__construct($message, (int) $code); |
||
| 25 | ZLog::Write($logLevel, get_class($this) .': '. $message . ' - code: '.$code. ' - file: '. $this->getFile().':'.$this->getLine(), false); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getHTTPCodeString() { |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getHTTPHeaders() { |
||
| 33 | return $this->httpHeaders; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function showLegalNotice() { |
||
| 38 | } |
||
| 39 | } |
||
| 40 |