本文整理汇总了PHP中phpiredis_format_command函数的典型用法代码示例。如果您正苦于以下问题:PHP phpiredis_format_command函数的具体用法?PHP phpiredis_format_command怎么用?PHP phpiredis_format_command使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phpiredis_format_command函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: writeCommand
/**
* {@inheritdoc}
*/
public function writeCommand(CommandInterface $command)
{
$cmdargs = $command->getArguments();
array_unshift($cmdargs, $command->getId());
$this->writeBytes(phpiredis_format_command($cmdargs));
}
示例2: writeRequest
/**
* {@inheritdoc}
*/
public function writeRequest(CommandInterface $command)
{
$arguments = $command->getArguments();
array_unshift($arguments, $command->getId());
$this->write(phpiredis_format_command($arguments));
}
示例3: executeCommand
/**
* {@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]);
}