protected function FlagNonGlobalCookieStorage::write in Flag 7.3
Same name and namespace in other branches
- 6.2 flag.inc \FlagNonGlobalCookieStorage::write()
- 7.2 flag.inc \FlagNonGlobalCookieStorage::write()
2 calls to FlagNonGlobalCookieStorage::write()
- FlagNonGlobalCookieStorage::flag in includes/
flag.cookie_storage.inc - "Flags" an item.
- FlagNonGlobalCookieStorage::unflag in includes/
flag.cookie_storage.inc - "Unflags" an item.
File
- includes/
flag.cookie_storage.inc, line 147 - Contains the FlagCookieStorage class.
Class
- FlagNonGlobalCookieStorage
- Storage handler for non-global flags.
Code
protected function write() {
$serialized = implode(' ', array_filter($this->flaggings));
setcookie('flags', $serialized, REQUEST_TIME + $this
->get_lifetime(), base_path());
$_COOKIE['flags'] = $serialized;
}