public static function CookieJar::shouldPersist in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php \GuzzleHttp\Cookie\CookieJar::shouldPersist()
Evaluate if this cookie should be persisted to storage that survives between requests.
Parameters
SetCookie $cookie Being evaluated.:
bool $allowSessionCookies If we should presist session cookies:
Return value
bool
2 calls to CookieJar::shouldPersist()
- FileCookieJar::save in vendor/
guzzlehttp/ guzzle/ src/ Cookie/ FileCookieJar.php - Saves the cookies to a file.
- SessionCookieJar::save in vendor/
guzzlehttp/ guzzle/ src/ Cookie/ SessionCookieJar.php - Save cookies to the client session
File
- vendor/
guzzlehttp/ guzzle/ src/ Cookie/ CookieJar.php, line 88
Class
- CookieJar
- Cookie jar that stores cookies an an array
Namespace
GuzzleHttp\CookieCode
public static function shouldPersist(SetCookie $cookie, $allowSessionCookies = false) {
if ($cookie
->getExpires() || $allowSessionCookies) {
if (!$cookie
->getDiscard()) {
return true;
}
}
return false;
}