/** * Create the notification instance */ private final function __construct() { if (Platform::isCli()) { $this->isCli = true; return; } $this->session = Session::getSession(); $messages = $this->session->get(self::SESSION_KEY); if (is_array($messages)) { $this->messages = $messages; $this->session->delete(self::SESSION_KEY); $this->session->write(); } }