1 | <?php |
||
17 | class NoticesContainer implements NoticesContainerInterface |
||
18 | { |
||
19 | |||
20 | |||
21 | /** |
||
22 | * @var NoticeInterface[] $attention |
||
23 | */ |
||
24 | private $attention = array(); |
||
25 | |||
26 | |||
27 | /** |
||
28 | * @var NoticeInterface[] $error |
||
29 | */ |
||
30 | private $error = array(); |
||
31 | |||
32 | |||
33 | /** |
||
34 | * @var NoticeInterface[] $success |
||
35 | */ |
||
36 | private $success = array(); |
||
37 | |||
38 | |||
39 | |||
40 | /** |
||
41 | * @param string $notice |
||
42 | * @param string $file |
||
43 | * @param string $func |
||
44 | * @param string $line |
||
45 | */ |
||
46 | public function addAttention($notice, $file = '', $func = '', $line = '') |
||
50 | |||
51 | |||
52 | |||
53 | /** |
||
54 | * @param string $notice |
||
55 | * @param string $file |
||
56 | * @param string $func |
||
57 | * @param string $line |
||
58 | */ |
||
59 | public function addError($notice, $file, $func, $line) |
||
63 | |||
64 | |||
65 | |||
66 | /** |
||
67 | * @param string $notice |
||
68 | * @param string $file |
||
69 | * @param string $func |
||
70 | * @param string $line |
||
71 | */ |
||
72 | public function addSuccess($notice, $file = '', $func = '', $line = '') |
||
76 | |||
77 | |||
78 | |||
79 | /** |
||
80 | * @return boolean |
||
81 | */ |
||
82 | public function hasAttention() |
||
86 | |||
87 | |||
88 | |||
89 | /** |
||
90 | * @return boolean |
||
91 | */ |
||
92 | public function hasError() |
||
96 | |||
97 | |||
98 | |||
99 | /** |
||
100 | * @return boolean |
||
101 | */ |
||
102 | public function hasSuccess() |
||
106 | |||
107 | |||
108 | |||
109 | /** |
||
110 | * @return int |
||
111 | */ |
||
112 | public function countAttention() |
||
116 | |||
117 | |||
118 | |||
119 | /** |
||
120 | * @return int |
||
121 | */ |
||
122 | public function countError() |
||
126 | |||
127 | |||
128 | |||
129 | /** |
||
130 | * @return int |
||
131 | */ |
||
132 | public function countSuccess() |
||
136 | |||
137 | |||
138 | |||
139 | /** |
||
140 | * @return NoticeInterface[] |
||
141 | */ |
||
142 | public function getAttention() |
||
146 | |||
147 | |||
148 | |||
149 | /** |
||
150 | * @return NoticeInterface[] |
||
151 | */ |
||
152 | public function getError() |
||
156 | |||
157 | |||
158 | |||
159 | /** |
||
160 | * @return NoticeInterface[] |
||
161 | */ |
||
162 | public function getSuccess() |
||
166 | |||
167 | |||
168 | } |
||
169 |