You are here

static function FlagGlobalCookieStorage::drop in Flag 7.3

Same name and namespace in other branches
  1. 6.2 flag.inc \FlagGlobalCookieStorage::drop()
  2. 7.2 flag.inc \FlagGlobalCookieStorage::drop()

Deletes all the global cookies.

Overrides FlagCookieStorage::drop

1 call to FlagGlobalCookieStorage::drop()
FlagCookieStorage::drop in includes/flag.cookie_storage.inc
Deletes all the cookies.

File

includes/flag.cookie_storage.inc, line 102
Contains the FlagCookieStorage class.

Class

FlagGlobalCookieStorage
Storage handler for global flags.

Code

static function drop() {
  foreach ($_COOKIE as $key => $value) {
    if (strpos($key, 'flag_global_') === 0) {
      setcookie($key, FALSE, 0, base_path());
      unset($_COOKIE[$key]);
    }
  }
}