1 | <?php |
||
28 | trait ErrorAwareTrait |
||
29 | { |
||
30 | /** |
||
31 | * error message |
||
32 | * |
||
33 | * @var string |
||
34 | * @access protected |
||
35 | */ |
||
36 | protected $error = ''; |
||
37 | |||
38 | /** |
||
39 | * error code |
||
40 | * |
||
41 | * @var string |
||
42 | * @access protected |
||
43 | */ |
||
44 | protected $error_code = ''; |
||
45 | |||
46 | /** |
||
47 | * 0 or '0000' etc means no error, = '' |
||
48 | * |
||
49 | * @var bool |
||
50 | * @access protected |
||
51 | */ |
||
52 | protected $zero_empty = true; |
||
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | */ |
||
57 | public function hasError()/*# : bool */ |
||
61 | |||
62 | /** |
||
63 | * {@inheritDoc} |
||
64 | */ |
||
65 | public function getError()/*# : string */ |
||
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | public function getErrorCode()/*# : int */ |
||
77 | |||
78 | /** |
||
79 | * {@inheritDoc} |
||
80 | */ |
||
81 | public function setError( |
||
97 | |||
98 | /** |
||
99 | * {@inheritDoc} |
||
100 | */ |
||
101 | public function copyError(ErrorAwareInterface $obj) |
||
107 | } |
||
108 |