/** * Obtiene mensaje en sesión * @param String $key Tipo */ public static function getMessage($key = 'message') { //if (empty($this->errors)) { $msg = \Supernova\Session::read($key); if (!empty($msg)) { \Supernova\Session::destroy($key); return $msg; } }
/** * Inicializa y limpia parametros */ public static function initialize() { date_default_timezone_set(TIMEZONE); \Supernova\Profiler::start(); \Supernova\Session::start(); \Supernova\Security::cleanAll(); \Supernova\Form::setContentType(); \Supernova\Translate::setLanguage(LANGUAGE_DEFAULT); self::setPostParameters(\Supernova\Security::sanitize($_POST)); self::setFilesParameters(\Supernova\Security::sanitize($_FILES)); }
/** * Elimina la sesion del usuario * @return null */ public static function unsetUser() { \Supernova\Session::destroy('AuthUser'); }