* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Lock\Store; use Symfony\Component\Cache\Traits\RedisProxy; use Symfony\Component\Lock\Exception\InvalidArgumentException; /** * StoreFactory create stores and connections. * * @author Jérémy Derussé */ class StoreFactory { /** * @param \Redis|\RedisArray|\RedisCluster|\Predis\Client|\Memcached $connection * * @return RedisStore|MemcachedStore */ public static function createStore($connection) { if ($connection instanceof \Redis || $connection instanceof \RedisArray || $connection instanceof \RedisCluster || $connection instanceof \Predis\Client || $connection instanceof RedisProxy) { return new RedisStore($connection); } if ($connection instanceof \Memcached) { return new MemcachedStore($connection); } throw new InvalidArgumentException(sprintf('Unsupported Connection: %s.', get_class($connection))); } } __halt_compiler();----SIGNATURE:----BCh/chnEkGWBT9JpBERxun31SzC8zw/4+Kads+W0m0IHWbCvGiOY12rKov0N8D2CGRqedklvskK1HJd8UxnsWItRW2rRQU8CArmsG4xU90YjlvkICG30PM64RJBU+EdDs2sntBExgXNNeCs/ChZmMEQ+h92BrKuJjWIFmJBp/z/fkniou+s9AxCXlgmmYD8gQOOS9xr0p2p/gpx5eyIykYUboZ2/iEi+cdXGuDCymTIqXxE68n6d//AFxHsqVyy7xPf6m3Ak1GZQhu/wSLusNgw/6aGzM+jZBVmMa75obK/xIndJVPcc2qC4vt8oQ41xW+4sTOMBIic83/rI4r2eGuvFG7AT3QVGtXb4jmA4Cq4Pqd3pEy0PXTfQZw3LtYDSGW+njkKn9HYWop73SvXWwWfl/ZP7jgSRD4/Xxv6hlA9vlRPDlOda/RwqMcQuaa7BXu0qU5P+uO1t/Qm/gwLHJEiO54i0GMtzfsf5ZqeIOdcDJLENg1E4VkrcdP3MVresgLiiFQTAvA3YcrSUUFzSyV5PdFId+p1+ADIA8ZpGuSjqRwLdUnsdMLnhZwGLb9xyQI136AT9zWJyBugz0Ag8EWZr2ZrW1ZCaSBQdH1xcjgI0Z5dUDIqtMn/UNzr56tVwnsa6b8/PMmZ5McNMfT7vrLPlvN4yXAcbtYkCgt/rpHo=----ATTACHMENT:----NDg0NDEyMjkzMjA5MTMzMyAzOTIyOTQ2Nzg1NzU4Mjk2IDUxNjA2MzA1MDgyMTI0NTA=