コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function writeCommand(CommandInterface $command)
 {
     $cmdargs = $command->getArguments();
     array_unshift($cmdargs, $command->getId());
     $this->writeBytes(phpiredis_format_command($cmdargs));
 }
コード例 #2
0
ファイル: predis.php プロジェクト: sohel4r/wordpress_4_1_1
 /**
  * {@inheritdoc}
  */
 public function writeRequest(CommandInterface $command)
 {
     $arguments = $command->getArguments();
     array_unshift($arguments, $command->getId());
     $this->write(phpiredis_format_command($arguments));
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function executeCommand(CommandInterface $command, callable $callback)
 {
     if ($this->buffer->isEmpty() && ($stream = $this->getResource())) {
         $this->loop->addWriteStream($stream, $this->writableCallback);
     }
     $cmdargs = $command->getArguments();
     array_unshift($cmdargs, $command->getId());
     $this->buffer->append(phpiredis_format_command($cmdargs));
     $this->commands->enqueue([$command, $callback]);
 }