static function FlagCookieStorage::factory in Flag 7.3
Same name and namespace in other branches
- 6.2 flag.inc \FlagCookieStorage::factory()
- 7.2 flag.inc \FlagCookieStorage::factory()
Returns the actual storage object compatible with the flag.
2 calls to FlagCookieStorage::factory()
- flag_flag::_flag_anonymous in includes/
flag/ flag_flag.inc - Set a cookie for anonymous users to record their flagging.
- flag_flag::_unflag_anonymous in includes/
flag/ flag_flag.inc - Remove the cookie for anonymous users to record their unflagging.
File
- includes/
flag.cookie_storage.inc, line 27 - Contains the FlagCookieStorage class.
Class
- FlagCookieStorage
- Utility class to handle cookies.
Code
static function factory($flag) {
if ($flag->global) {
return new FlagGlobalCookieStorage($flag);
}
else {
return new FlagNonGlobalCookieStorage($flag);
}
}