Browse Source

unset for session vars

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@63 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
pzinovkin 16 years ago
parent
commit
d569fc874b
  1. 12
      classes/Env.class.php

12
classes/Env.class.php

@ -39,6 +39,18 @@ final class Env
$_SESSION[$var] = $value; $_SESSION[$var] = $value;
} }
/**
* Unsets session var
*
* @param string $var
*/
static function unsetSession($var)
{
if (isset($_SESSION[$var])) {
unset($_SESSION[$var]);
}
}
static function getCookie($var, $default = false) static function getCookie($var, $default = false)
{ {
return isset($_COOKIE[$var]) ? $_COOKIE[$var] : $default; return isset($_COOKIE[$var]) ? $_COOKIE[$var] : $default;

Loading…
Cancel
Save