1 | <?php |
||
8 | class FlashMsg implements \Anax\DI\IInjectionAware { |
||
|
|||
9 | |||
10 | use \Anax\DI\TInjectable; |
||
11 | |||
12 | /** |
||
13 | * Add message to session array |
||
14 | * |
||
15 | * @param $type string with message type |
||
16 | * @param $message string with message text |
||
17 | * |
||
18 | * @return void |
||
19 | */ |
||
20 | 9 | public function setMessage($type, $message) { |
|
28 | |||
29 | /** |
||
30 | * Add alert message to session array |
||
31 | * |
||
32 | * @param $message string with message text |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | 1 | public function alert($message) { |
|
39 | |||
40 | /** |
||
41 | * Add error message to session array |
||
42 | * |
||
43 | * @param $message string with message text |
||
44 | * |
||
45 | * @return void |
||
46 | */ |
||
47 | 1 | public function error($message) { |
|
50 | |||
51 | /** |
||
52 | * Add info message to session array |
||
53 | * |
||
54 | * @param $message string with message text |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | 1 | public function info($message) { |
|
61 | |||
62 | /** |
||
63 | * Add notice message to session array |
||
64 | * |
||
65 | * @param $message string with message text |
||
66 | * |
||
67 | * @return void |
||
68 | */ |
||
69 | 3 | public function notice($message) { |
|
72 | |||
73 | /** |
||
74 | * Add success message to session array |
||
75 | * |
||
76 | * @param $message string with message text |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | 3 | public function success($message) { |
|
83 | |||
84 | /** |
||
85 | * Add warning message to session array |
||
86 | * |
||
87 | * @param $message string with message text |
||
88 | * |
||
89 | * @return void |
||
90 | */ |
||
91 | 3 | public function warning($message) { |
|
94 | |||
95 | /** |
||
96 | * Build HTML of messages in session array |
||
97 | * |
||
98 | * @return $output HTML string with messages |
||
99 | */ |
||
100 | 1 | public function outputMsgs() { |
|
112 | |||
113 | /** |
||
114 | * Clear session message array |
||
115 | * |
||
116 | * @return void |
||
117 | */ |
||
118 | 1 | public function clearMessages() { |
|
121 | } |
||
122 |