GetCommand.php 550 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /*
  3. * This file is part of the Redisun package.
  4. *
  5. * (c) LI Mengxiang <limengxiang876@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Limen\Redisun\Commands;
  11. class GetCommand extends Command
  12. {
  13. public function getScript()
  14. {
  15. $script = <<<LUA
  16. local values = {};
  17. for i,v in ipairs(KEYS) do
  18. values[#values+1] = redis.call('get',v);
  19. end
  20. return {KEYS,values};
  21. LUA;
  22. return $script;
  23. }
  24. }