GetRange.php 624 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace EasySwoole\Redis\CommandHandle;
  3. use EasySwoole\Redis\CommandConst;
  4. use EasySwoole\Redis\Redis;
  5. use EasySwoole\Redis\Response;
  6. class GetRange extends AbstractCommandHandle
  7. {
  8. public $commandName = 'GetRange';
  9. public function handelCommandData(...$data)
  10. {
  11. $key=array_shift($data);
  12. $this->setClusterExecClientByKey($key);
  13. $start=array_shift($data);
  14. $end=array_shift($data);
  15. $command = [CommandConst::GETRANGE,$key,$start,$end];
  16. $commandData = array_merge($command,$data);
  17. return $commandData;
  18. }
  19. public function handelRecv(Response $recv)
  20. {
  21. return $recv->getData();
  22. }
  23. }