*/ class StoreFactory { public static function createStore(object|string $connection): PersistingStoreInterface { switch (true) { case $connection instanceof \Redis: case $connection instanceof \RedisArray: case $connection instanceof \RedisCluster: case $connection instanceof \Predis\ClientInterface: case $connection instanceof RedisProxy: case $connection instanceof RedisClusterProxy: 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(); case str_starts_with($connection, 'flock://'): return new FlockStore(substr($connection, 8)); case 'semaphore' === $connection: return new SemaphoreStore(); case str_starts_with($connection, 'redis:'): case str_starts_with($connection, 'rediss:'): case str_starts_with($connection, 'memcached:'): if (!class_exists(AbstractAdapter::class)) { throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $connection)); } $storeClass = str_starts_with($connection, 'memcached:') ? MemcachedStore::class : RedisStore::class; $connection = AbstractAdapter::createConnection($connection, ['lazy' => true]); return new $storeClass($connection); case str_starts_with($connection, 'mongodb'): return new MongoDbStore($connection); case str_starts_with($connection, 'mssql://'): case str_starts_with($connection, 'mysql://'): case str_starts_with($connection, 'mysql2://'): case str_starts_with($connection, 'oci8://'): case str_starts_with($connection, 'pdo_oci://'): case str_starts_with($connection, 'pgsql://'): case str_starts_with($connection, 'postgres://'): case str_starts_with($connection, 'postgresql://'): case str_starts_with($connection, 'sqlite://'): case str_starts_with($connection, 'sqlite3://'): return new DoctrineDbalStore($connection); case str_starts_with($connection, 'mysql:'): case str_starts_with($connection, 'oci:'): case str_starts_with($connection, 'pgsql:'): case str_starts_with($connection, 'sqlsrv:'): case str_starts_with($connection, 'sqlite:'): return new PdoStore($connection); case str_starts_with($connection, 'pgsql+advisory://'): case str_starts_with($connection, 'postgres+advisory://'): case str_starts_with($connection, 'postgresql+advisory://'): return new DoctrineDbalPostgreSqlStore($connection); case str_starts_with($connection, 'pgsql+advisory:'): return new PostgreSqlStore(preg_replace('/^([^:+]+)\+advisory/', '$1', $connection)); case str_starts_with($connection, 'zookeeper://'): return new ZookeeperStore(ZookeeperStore::createConnection($connection)); case 'in-memory' === $connection: return new InMemoryStore(); } throw new InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection)); } } __halt_compiler();----SIGNATURE:----ii/xnzt+DVrpKuX3+4rXeEYtblBIKo/Rs5fqxoaKBYfnCTJA+Bprhp4ZpmlQ2bZj7Ypg34wwij9mRNhmzdqxM1p2wXDJ1N3guKk7AykBz/O8SDaTQCyJ8T9JVfGask9Hup5xIqgtOxBVM3IDPDdRGla653nURjC6iVmX4kdxCI53XhLarWUOlp5r/sitnDUHtUB/9nCt1EW5qoOJEheiElzQF7h0IyQUkJV8F4eMdXSUQ633yiGUbA8Vdu85fxrv+qyym3AB12eqQFwG70EjKQB05xaw1MFkUckkq/GvRU8u3MoONf5UYyXYjm2ym1ce839cR0/tS06JmOutlg3lX4+D/3RrQrzaEOW82r/jjEfuyFrn9xovcoAHslGRWJhPHYiX+rozPrtGXnEdW8YcOkfYp2uqfPm/AiF66OXOIPROEKRi6wY/woPEWrMvIwxaueY3fYUGsmCz+kxizRem+HNL4LBq6fI0C3IwM64B8Om1Yy+4fNMiJa2o2ETHnWv8gCCFdYCkFKyl0YClvfkBl8ahLz8gp7QbFcDWhQRxupPoAdyIX6pKlgMjzp6VL+nMjE7K3irSMl5vkp8UcMBx8VLAa+40zTLNv1PTYCWC2tGDhb9GhHvvmlekiZQFfKbsFd37+0ZdgfDJuAn2fqvM/sEhl9qDdKSdNbTOfkV/Jvg=----ATTACHMENT:----MjkyMzc4NDUyODc1MTI1NSA1ODExMjQ5NzAyNjkwMjE0IDkyNDgyMjA2ODc5MTg4MTI=