Predis\Connection\Cluster\PredisCluster::getConnectionByCommand PHP Метод

getConnectionByCommand() публичный Метод

public getConnectionByCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface
    public function getConnectionByCommand(CommandInterface $command)
    {
        $slot = $this->strategy->getSlot($command);
        if (!isset($slot)) {
            throw new NotSupportedException("Cannot use '{$command->getId()}' over clusters of connections.");
        }
        $node = $this->distributor->getBySlot($slot);
        return $node;
    }