-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathError.php
More file actions
42 lines (33 loc) · 887 Bytes
/
Copy pathError.php
File metadata and controls
42 lines (33 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Copyright (C) 2015-2019 FeatherBB
* based on code by (C) 2008-2015 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
namespace FeatherBB\Core;
class Error extends \Exception
{
protected $backlink;
protected $html;
protected $simpleError;
public function __construct($message, $code = 400, $backlink = true, $html = false, $simpleError = false)
{
parent::__construct($message, $code);
$this->backlink = (bool) $backlink;
$this->html = (bool) $html;
$this->simpleError = (bool) $simpleError;
}
public function hasBacklink()
{
return $this->backlink;
}
public function displayHtml()
{
return $this->html;
}
public function isSimpleError()
{
return $this->simpleError;
}
}