public function NativeSessionStorage::setOptions

Sets session.* ini variables.

For convenience we omit 'session.' from the beginning of the keys. Explicitly ignores other ini keys.

Parameters

array $options Session ini directives array(key => value).:

See also

http://php.net/session.configuration

1 call to NativeSessionStorage::setOptions()
NativeSessionStorage::__construct in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php
Constructor.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php, line 313

Class

NativeSessionStorage
This provides a base class for session attribute storage.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function setOptions(array $options) {
  $validOptions = array_flip(array(
    'cache_limiter',
    'cookie_domain',
    'cookie_httponly',
    'cookie_lifetime',
    'cookie_path',
    'cookie_secure',
    'entropy_file',
    'entropy_length',
    'gc_divisor',
    'gc_maxlifetime',
    'gc_probability',
    'hash_bits_per_character',
    'hash_function',
    'name',
    'referer_check',
    'serialize_handler',
    'use_cookies',
    'use_only_cookies',
    'use_trans_sid',
    'upload_progress.enabled',
    'upload_progress.cleanup',
    'upload_progress.prefix',
    'upload_progress.name',
    'upload_progress.freq',
    'upload_progress.min-freq',
    'url_rewriter.tags',
  ));
  foreach ($options as $key => $value) {
    if (isset($validOptions[$key])) {
      ini_set('session.' . $key, $value);
    }
  }
}