public static function init() : void
    {
        if ( ! empty($_SESSION[Notification::SESSION_KEY]) && is_array($_SESSION[Notification::SESSION_KEY])) {
            Notification::$notifications = $_SESSION[Notification::SESSION_KEY];
        }

        $_SESSION[Notification::SESSION_KEY] = [];
    }
public static function init() : void
    {
        if ( ! empty($_SESSION[Notification::SESSION_KEY]) && is_array($_SESSION[Notification::SESSION_KEY])) {
            Notification::$notifications = $_SESSION[Notification::SESSION_KEY];
        }

        $_SESSION[Notification::SESSION_KEY] = [];
    }
public static function init ( ) : void { if ( ! empty ( $ _SESSION [ Notification :: SESSION_KEY ] ) && is_array ( $ _SESSION [ Notification :: SESSION_KEY ] ) ) { Notification :: $ notifications = $ _SESSION [ Notification :: SESSION_KEY ] ; } $ _SESSION [ Notification :: SESSION_KEY ] = [ ] ; }
Initializes the Notification service.

Notification::init();

This will read notification/flash data from the $_SESSION variable and load it into
the $this->previous array.
Initializes the Notification service .