1 | <?php |
||
8 | class FlashMsg implements \Anax\DI\IInjectionAware { |
||
|
|||
9 | |||
10 | use \Anax\DI\TInjectable; |
||
11 | |||
12 | /** |
||
13 | * Initialize the controller. |
||
14 | * |
||
15 | * @return void |
||
16 | */ |
||
17 | public function initialize() { |
||
22 | |||
23 | /** |
||
24 | * Add message to session array |
||
25 | * |
||
26 | * @param $type string with message type |
||
27 | * @param $message string with message text |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | 9 | public function setMessage($type, $message) { |
|
36 | |||
37 | /** |
||
38 | * Add alert message to session array |
||
39 | * |
||
40 | * @param $message string with message text |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | 1 | public function alert($message) { |
|
47 | |||
48 | /** |
||
49 | * Add error message to session array |
||
50 | * |
||
51 | * @param $message string with message text |
||
52 | * |
||
53 | * @return void |
||
54 | */ |
||
55 | 1 | public function error($message) { |
|
58 | |||
59 | /** |
||
60 | * Add info message to session array |
||
61 | * |
||
62 | * @param $message string with message text |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | 1 | public function info($message) { |
|
69 | |||
70 | /** |
||
71 | * Add notice message to session array |
||
72 | * |
||
73 | * @param $message string with message text |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | 3 | public function notice($message) { |
|
80 | |||
81 | /** |
||
82 | * Add success message to session array |
||
83 | * |
||
84 | * @param $message string with message text |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | 3 | public function success($message) { |
|
91 | |||
92 | /** |
||
93 | * Add warning message to session array |
||
94 | * |
||
95 | * @param $message string with message text |
||
96 | * |
||
97 | * @return void |
||
98 | */ |
||
99 | 3 | public function warning($message) { |
|
102 | |||
103 | /** |
||
104 | * Build HTML of messages in session array |
||
105 | * |
||
106 | * @return $output HTML string with messages |
||
107 | */ |
||
108 | 1 | public function outputMsgs() { |
|
120 | |||
121 | /** |
||
122 | * Clear session message array |
||
123 | * |
||
124 | * @return void |
||
125 | */ |
||
126 | 1 | public function clearMessages() { |
|
129 | } |
||
130 |