public function SessionConfiguration::getOptions
public SessionConfiguration::getOptions(Request $request)
Returns a list of options suitable for passing to the session storage.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The request.
Return value
array An associative array of session ini settings.
Overrides SessionConfigurationInterface::getOptions
See also
\Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage::__construct()
File
- core/lib/Drupal/Core/Session/SessionConfiguration.php, line 40
Class
- SessionConfiguration
- Defines the default session configuration generator.
Namespace
Drupal\Core\SessionCode
public function getOptions(Request $request) { $options = $this->options; // Generate / validate the cookie domain. $options['cookie_domain'] = $this->getCookieDomain($request) ? : ''; // If the site is accessed via SSL, ensure that the session cookie is // issued with the secure flag. $options['cookie_secure'] = $request->isSecure(); // Set the session cookie name. $options['name'] = $this->getName($request); return $options; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Session!SessionConfiguration.php/function/SessionConfiguration::getOptions/8.1.x