case $connection instanceof \RedisCluster:
case $connection instanceof \Predis\ClientInterface:
return new RedisStore($connection);
case $connection instanceof \Memcached:
return new MemcachedStore($connection);
case $connection instanceof \MongoDB\Collection:
return new MongoDbStore($connection);
case $connection instanceof \PDO:
return new PdoStore($connection);
case $connection instanceof Connection:
return new DoctrineDbalStore($connection);
case $connection instanceof \Zookeeper:
return new ZookeeperStore($connection);
case !\
is_string($connection):
throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".',
get_debug_type($connection)));
case 'flock' ===
$connection:
return new FlockStore();