Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
42 * @param \Memcache $memcache A \Memcache instance | 42 * @param \Memcache $memcache A \Memcache instance |
43 * @param array $options An associative array of Memcache options | 43 * @param array $options An associative array of Memcache options |
44 * | 44 * |
45 * @throws \InvalidArgumentException When unsupported options are passed | 45 * @throws \InvalidArgumentException When unsupported options are passed |
46 */ | 46 */ |
47 public function __construct(\Memcache $memcache, array $options = array()) | 47 public function __construct(\Memcache $memcache, array $options = []) |
48 { | 48 { |
49 if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { | 49 if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime'])) { |
50 throw new \InvalidArgumentException(sprintf( | 50 throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); |
51 'The following options are not supported "%s"', implode(', ', $diff) | |
52 )); | |
53 } | 51 } |
54 | 52 |
55 $this->memcache = $memcache; | 53 $this->memcache = $memcache; |
56 $this->ttl = isset($options['expiretime']) ? (int) $options['expiretime'] : 86400; | 54 $this->ttl = isset($options['expiretime']) ? (int) $options['expiretime'] : 86400; |
57 $this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2s'; | 55 $this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2s'; |