* * 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:----o+iyAreJnAKyn9WgPwibI0TOutFkXhFNDMFy4PCwclGOyglYWrhnoAlNgIKYLkq3O0Kxv1FrfDuL5Kq8I6rIQ47tWJQxQRyLWnkfMP3lExX+6mE8YPOUfsPujJT/rVV5w4d7/hNEAGeqn0eXSNb+y7P7eRTQWf8Ksutih3GQCqbh2TmFMkJLXR4WccKywbD4LN5Qh2yF2k7ImQ+Ad8mZ0DSdhaKI4nDGQE83TddMX5SuytN0zSQ/6DCKgZJ/sKukvGJAXFFvQNgV8v5jICKdB84NubuwVb2fcpyQXRS5wolRtSo8mwPniY8kHOQpr6BWcVKBcmnXupqtD1bunGE7JykmLK70umsbtgLXzKhl5UFejDZ27LysLnrQHjKDHn3DoLIfTV81+rwNxwxV6fCCQsCCGfc31RgTR3Xdz1s8crZK5KOFoVZA7rL17/oGXwkRvLBSrFurhwihtd8PH2Swvl8oaSFaaCn7jGv2dsV2Pd71COFoD3Quhyjjraw4KSt45EkbuuBkE68AVeh1r+APBP2Zb/BJk1vUAc/dvaXtj1m0SjCNd7aPzeCQRj1yKVdUmR5TGlv+zCmhuupnmhB6vJQvB3OyrRZtPn8xGWXb2zMtXYiJrSe1unqdhNeTV8TKhNcWkih1tSAATA9CteY2X4DyI37jscTkVRJm8rYVlWw=----ATTACHMENT:----NTEwOTg3MDM0MDE1OTk5NiA3MzIzNzUxNTIzNzYwMTI0IDg0MTg5NTgyODgwNzIyOTg=