Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Utils; |
15 | |
16 | /** |
17 | * Pop utils error interface |
18 | * |
19 | * @category Pop |
20 | * @package Pop\Utils |
21 | * @author Nick Sagona, III <dev@nolainteractive.com> |
22 | * @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
23 | * @license http://www.popphp.org/license New BSD License |
24 | * @version 1.2.0 |
25 | */ |
26 | interface ErrorInterface |
27 | { |
28 | |
29 | /** |
30 | * Get error codes |
31 | * |
32 | * @return array |
33 | */ |
34 | public function getErrorCodes(); |
35 | |
36 | /** |
37 | * Set error code (clear all previous errors) |
38 | * |
39 | * @param mixed $errorCode |
40 | * @return ErrorInterface |
41 | */ |
42 | public function setErrorCode($errorCode); |
43 | |
44 | /** |
45 | * Set error codes (clear all previous errors) |
46 | * |
47 | * @param array $errorCodes |
48 | * @return ErrorInterface |
49 | */ |
50 | public function setErrorCodes(array $errorCodes); |
51 | |
52 | /** |
53 | * Add error code |
54 | * |
55 | * @param mixed $errorCode |
56 | * @return ErrorInterface |
57 | */ |
58 | public function addErrorCode($errorCode); |
59 | |
60 | /** |
61 | * Add error codes |
62 | * |
63 | * @param array $errorCodes |
64 | * @return ErrorInterface |
65 | */ |
66 | public function addErrorCodes(array $errorCode); |
67 | |
68 | /** |
69 | * Has error codes |
70 | * |
71 | * @return boolean |
72 | */ |
73 | public function hasErrorCodes(); |
74 | |
75 | /** |
76 | * Has error (alias) |
77 | * |
78 | * @return boolean |
79 | */ |
80 | public function hasError(); |
81 | |
82 | /** |
83 | * Is error (alias) |
84 | * |
85 | * @return boolean |
86 | */ |
87 | public function isError(); |
88 | |
89 | /** |
90 | * Get error messages |
91 | * |
92 | * @return array |
93 | */ |
94 | public function getErrorMessages(); |
95 | |
96 | /** |
97 | * Get all error messages |
98 | * |
99 | * @return array |
100 | */ |
101 | public function getAllErrorMessages(); |
102 | |
103 | /** |
104 | * Get all error codes |
105 | * |
106 | * @return array |
107 | */ |
108 | public function getAllErrorCodes(); |
109 | |
110 | /** |
111 | * Get error message from a provided error code |
112 | * |
113 | * @param mixed $errorCode |
114 | * @return string |
115 | */ |
116 | public function getErrorMessage($errorCode); |
117 | |
118 | } |