* * 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:----b9BHswx0NkyTc+Z9rNNGQxbijWoE1lYmWFhPpkHmA23wJaZU6NYvCbAhGNycd1LmrOVizHk0kS/0PM+l/sqOy+NlJ9Ogl+rjCcsiC6XOPscu1WkFVK8fjos/WgPt0E60axMFNqZv69uiObIKYgVnWx0ih6UMPZ+EFnkc4PhjvQ/p3h9DPkemm687gLBQ4EsqoEJTY0FyveG8+bzm0EsOrZFv/SdMMp7ZeBkXGWzgH6P98jYochhjVQKsu9TyJvZg3lh4k1G4POCFzBDkiCVOyLc5iqGUEWUcBEzBZCKAIjctAIdyLd8Hj2xBWuGQAn1Ckw6h3SACnCWdFyNpfXQZInhg6qGixJnrE0BxkywpsVCC3PKGDm1CVZpF1id8UUp4OUIPzsiQOO08etXhoIke/LCw0iwyXF62XEygDZBbPPX8wPElC7S32AUgGqxdOK1Zu73yUrI2DdI3bMUMdQqRTwSEtRLxff2jNmXWGwCh6y/RF4ESW/Kctl1x8aLtdCtSFK3sZuepH1je/r3+iFaC0bJGlyCFYEWVAkHdld0b/x1Tgdgo2fTSW2wrZouVUmInmlA73oGXD3Pn/PkInyE3O8mivCbPQBVKBVxAJRjKKUTPno3wk2LBr+fokRK4Xaz/6q7q/zEafQyJYGCAu2t8WEcW9LzHUxI9A9T2qYnK6ns=----ATTACHMENT:----NDY1Mzc0OTE3MDg5OTc0MyA4OTE1Mjc2MTI4ODkzOTEwIDY4ODYxNTY0OTI4NjM2ODc=