1 | <?php |
||
5 | class PendingError |
||
6 | { |
||
7 | public static $maxLength = 60; |
||
8 | |||
9 | private $type; |
||
10 | |||
11 | private $header; |
||
12 | |||
13 | private $errorData; |
||
14 | |||
15 | private $linkPath; |
||
16 | |||
17 | private $linkLineNumber = 4; |
||
18 | |||
19 | /** |
||
20 | * PendingError constructor. |
||
21 | * |
||
22 | * @param $type |
||
23 | */ |
||
24 | public function __construct($type) |
||
28 | |||
29 | /** |
||
30 | * Sets the content of the error header. |
||
31 | * |
||
32 | * @param string $header |
||
33 | * |
||
34 | * @return $this |
||
35 | */ |
||
36 | public function header(string $header) |
||
42 | |||
43 | /** |
||
44 | * Sets the data to give out as error. |
||
45 | * |
||
46 | * @param $data |
||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | public function errorData($data) |
||
57 | |||
58 | /** |
||
59 | * Sets the link to the source error. |
||
60 | * |
||
61 | * @param $path |
||
62 | * @param int $lineNumber |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function link($path = null, $lineNumber = 4) |
||
74 | |||
75 | public function getType() |
||
79 | |||
80 | public function getHeader() |
||
84 | |||
85 | public function getErrorData() |
||
89 | |||
90 | public function getLinkPath() |
||
94 | |||
95 | public function getLinkLineNumber() |
||
99 | |||
100 | private function setMaxLength($len) |
||
105 | } |
||
106 |