Flash
Stores messages (notice, warning, message) to display to the user after a redirect.
Summary
| Flash | Stores messages (notice, warning, message) to display to the user after a redirect. |
| Variables | |
| $notices | Manages notices. |
| $warnings | Manages warnings. |
| $messages | Manages messages. |
| $all | Manages all Flashes. |
| $exists | Do any Flashes exist? |
| Functions | |
| __construct | Removes empty notification variables from the session. |
| prepare | Prepare the structure of the “flash” session value. |
| message | Add a message (neutral) to the session. |
| notice | Add a notice (positive) message to the session. |
| warning | Add a warning (negative) message to the session. |
| messages | Sets Flash.$messages to $_SESSION[‘messages’] and destroys the session value. |
| notices | Sets Flash.$notices to $_SESSION[‘notices’] and destroys the session value. |
| warnings | Sets Flash.$warnings to $_SESSION[‘warnings’] and destroys the session value. |
| all | Returns an associative array of all messages and destroys their session values. |
| serve | Serves a message of type $type and destroys it from the session. |
| exists | Checks for flash messages. |
| current | Returns a singleton reference to the current class. |
messages
public function messages()
Sets Flash.$messages to $_SESSION[‘messages’] and destroys the session value.
Returns
notices
public function notices()
Sets Flash.$notices to $_SESSION[‘notices’] and destroys the session value.
Returns
warnings
public function warnings()
Sets Flash.$warnings to $_SESSION[‘warnings’] and destroys the session value.