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