@@ 79-85 (lines=7) @@ | ||
76 | * |
|
77 | * @return Entities\IMessage |
|
78 | */ |
|
79 | public function success($message, $title = NULL) : Entities\IMessage |
|
80 | { |
|
81 | $args = func_get_args(); |
|
82 | array_splice($args, 1, 0, [Entities\IMessage::LEVEL_SUCCESS]); |
|
83 | ||
84 | return call_user_func_array([$this, 'setMessage'], $args); |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * Flash an information message |
|
@@ 95-101 (lines=7) @@ | ||
92 | * |
|
93 | * @return Entities\IMessage |
|
94 | */ |
|
95 | public function info($message, $title = NULL) : Entities\IMessage |
|
96 | { |
|
97 | $args = func_get_args(); |
|
98 | array_splice($args, 1, 0, [Entities\IMessage::LEVEL_INFO]); |
|
99 | ||
100 | return call_user_func_array([$this, 'setMessage'], $args); |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * Flash a warning message |
|
@@ 111-117 (lines=7) @@ | ||
108 | * |
|
109 | * @return Entities\IMessage |
|
110 | */ |
|
111 | public function warning($message, $title = NULL) : Entities\IMessage |
|
112 | { |
|
113 | $args = func_get_args(); |
|
114 | array_splice($args, 1, 0, [Entities\IMessage::LEVEL_WARNING]); |
|
115 | ||
116 | return call_user_func_array([$this, 'setMessage'], $args); |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * Flash an error message |
|
@@ 127-133 (lines=7) @@ | ||
124 | * |
|
125 | * @return Entities\IMessage |
|
126 | */ |
|
127 | public function error($message, $title = NULL) : Entities\IMessage |
|
128 | { |
|
129 | $args = func_get_args(); |
|
130 | array_splice($args, 1, 0, [Entities\IMessage::LEVEL_ERROR]); |
|
131 | ||
132 | return call_user_func_array([$this, 'setMessage'], $args); |
|
133 | } |
|
134 | ||
135 | /** |
|
136 | * Add an "important" flash to the session |