1 | <?php |
||
21 | class Error |
||
22 | { |
||
23 | /** |
||
24 | * @see ErrorReasons |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private $reason; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $message; |
||
34 | |||
35 | /** |
||
36 | * Constructor. |
||
37 | * |
||
38 | * @param string $reason |
||
39 | * @param string $message |
||
40 | */ |
||
41 | 5 | public function __construct(string $reason, string $message = null) |
|
46 | |||
47 | /** |
||
48 | * Get the reason of error |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | 2 | public function getReason(): string |
|
56 | |||
57 | /** |
||
58 | * Get the message of error |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | 2 | public function getMessage(): ?string |
|
66 | } |
||
67 |