public function Kitchen::cookieName in Bakery Single Sign-On System 8.2
Name for cookie including session.cookie_secure and variable extension.
Parameters
string $type: CHOCOLATECHIP or OATMEAL.
Return value
string The cookie name for this environment.
2 calls to Kitchen::cookieName()
- Kitchen::eat in src/
Kitchen.php - Nom Nom Nom Nom.
- Kitchen::taste in src/
Kitchen.php - Check that the given cookie exists and doesn't taste funny.
File
- src/
Kitchen.php, line 289
Class
Namespace
Drupal\bakeryCode
public function cookieName(string $type) : string {
// Use different names for HTTPS and HTTP to prevent a cookie collision.
if (ini_get('session.cookie_secure')) {
$type .= 'SSL';
}
// Allow installation to modify the cookie name.
$extension = $this->config
->get('bakery_cookie_extension') ?: '';
return $type . $extension;
}