$query['ttl'
] =
$options['ttl'
];
} } $options =
($query ?:
[]) +
$options;
switch (true
) { case $connection instanceof \Redis:
case $connection instanceof Relay:
case $connection instanceof \RedisArray:
case $connection instanceof \RedisCluster:
case $connection instanceof \Predis\ClientInterface:
return new RedisSessionHandler($connection);
case $connection instanceof \Memcached:
return new MemcachedSessionHandler($connection);
case $connection instanceof \PDO:
return new PdoSessionHandler($connection);
case !\
is_string($connection):
throw new \
InvalidArgumentException(sprintf('Unsupported Connection: "%s".',
get_debug_type($connection)));
case str_starts_with($connection, 'file://'
):
$savePath =
substr($connection, 7
);