Predis\Cluster\ClusterStrategy::getKeyFromScriptingCommands PHP Метод

getKeyFromScriptingCommands() защищенный Метод

Extracts the key from EVAL and EVALSHA commands.
protected getKeyFromScriptingCommands ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
Результат string | null
    protected function getKeyFromScriptingCommands(CommandInterface $command)
    {
        if ($command instanceof ScriptCommand) {
            $keys = $command->getKeys();
        } else {
            $keys = array_slice($args = $command->getArguments(), 2, $args[1]);
        }
        if ($keys && $this->checkSameSlotForKeys($keys)) {
            return $keys[0];
        }
    }