Example #1
0
 /**
  * @static
  * @return Flash The global Flash instance
  */
 public static function getFlash()
 {
     $oSession = Session::getSession();
     if (self::$INSTANCE === null) {
         if ($oSession->hasAttribute(self::FLASH_KEY)) {
             self::$INSTANCE = $oSession->getAttribute(self::FLASH_KEY);
             $oSession->resetAttribute(self::FLASH_KEY);
         } else {
             self::$INSTANCE = new Flash();
         }
     }
     return self::$INSTANCE;
 }