Example #1
0
 /**
  * empties and destroys the session
  */
 public static function destroy($key = '')
 {
     if (self::$sessionStarted == true) {
         if (empty($key)) {
             session_unset();
             session_destroy();
         } else {
             unset($_SESSION[\HMC\Config::SESSION_PREFIX() . $key]);
         }
     }
 }