Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ZookeeperStore example
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
(
)
;
case
str_starts_with
(
$connection
, 'flock://'
)
:
return
new
FlockStore
(
substr
(
$connection
, 8
)
)
;
case
'semaphore' ===
$connection
:
return
new
SemaphoreStore
(
)
;