public static function flushMessage() { if (!empty($_SESSION['flash']['message'])) { $type = isset($_SESSION['flash']['type']) ? $_SESSION['flash']['type'] : 'warning'; ViewHelper::alertMessage($_SESSION['flash']['message'], $type); unset($_SESSION['flash']); } }