Executes the specified Redis command.

@param CommandInterface $command  Command instance.
@param callable         $callback Response callback.
761114
public function executeCommand(CommandInterface $command, callable $callback)
    {
        $this->connection->executeCommand($command, $this->wrapCallback($callback));
    }
776095
public function runCommand(Command $command, InputInterface $input, OutputInterface $output) {
    return $this->doRunCommand($command, $input, $output);
  }
160180
public function run($commands, Closure $callback = null)
    {
        foreach ($this->connections as $connection) {
            $connection->run($commands, $callback);
        }
    }
1236718
protected function handle(CommandInterface $command)
	{
		if($command instanceof SelfHandlingCommandInterface)
		{
			return $command->handle();
		}

		$handler = $this->resolveCommandHandler($command);

		return $this->executeCommandHandler($handler, $command);
	}
796423
def call(self, command, *args):
        
        command = self._normalize_command_name(command)
        args = self._normalize_command_args(command, *args)

        redis_function = getattr(self, command)
        value = redis_function(*args)
        return self._normalize_command_response(command, value)
712176
public function execute($key, callable $callback)
    {
        $this->acquire($key);
        try {
            $callback();
        } finally {
            $this->release($key);
        }
    }
375206
public function dispatch(Command $command, CommandCallback $callback = null)
    {
        $command = $this->intercept($command);

        $handler = $this->handlerRegistry->findCommandHandlerFor($command);

        $this->unitOfWork->start();
        $interceptorChain = new DefaultInterceptorChain($command, $this->unitOfWork, $handler, ...$this->handlerInterceptors);

        try {
            $result = $interceptorChain->proceed();
            if (null !== $callback) {
                $callback->onSuccess($result);
            }
        } catch (\Exception $exception) {
            $this->unitOfWork->rollback($exception);
            if (null !== $callback) {
                $callback->onFailure($exception);
            }

            throw $exception;
        }

        $this->unitOfWork->commit();

        return $result;
    }
821377
public function executeInContext($context, $service, $operation, $argv = array(), $callback = null)
	{
	    $command = new Command(
            $service,
            $operation,
            $argv,
	        $context);

	    return $this->dispatch($command, $callback);
	}
1257621
public function dryRunCommand(CommandInterface $command)
    {
        $this->newLine();
        $this->write(' // Dry-run: ' . $command->getName());
        $this->newLine(3);
    }
618732
public function execute(interfaces\commands\Command $command)
    {
        $handler = $this->resolver->resolve($command);
        
        return call_user_func([$handler, 'handle'], $command);
    }
693419
public function execute(\Sigbits\RoombaLib\SCI\Command $command)
    {
        $this->connection->write($command);
    }
859185
public function exec($command, $callback = null)
    {
        $this->commandStack[] = [
            'command' => new Command($this->receiveCommand($command)),
            'callback' => $callback,
        ];

        return $this;
    }
488074
public function command()
    {
        $cmd = func_get_args();

        if (strpos($cmd[0], 'plugin.') === 0) {
            $this->callbacks[] = $cmd;
        }
        else {
            $this->commands[] = $cmd;
        }
    }
32617
public function register(CommandInterface $command)
    {
        /*
         * Gets the name of the command
         * @var string
         */
        $name = $command->getCommand();

        /*
         * Check if the command isn't already registered
         * otherwise throw an exception
         */
        if (array_key_exists($name, $this->commands)) {
            throw new CommandException("Command with name '$name' already registered");
        }

        /*
         * Adds the command to the array
         */
        $this->commands[$name] = $command;
    }
400420
public function executeCommand(CommandInterface $command)
    {
        $this->initialize();

        if ($this->state->isCAS()) {
            return $this->client->executeCommand($command);
        }

        $response = $this->client->getConnection()->executeCommand($command);

        if ($response instanceof StatusResponse && $response == 'QUEUED') {
            $this->commands->enqueue($command);
        } elseif ($response instanceof ErrorResponseInterface) {
            throw new AbortedMultiExecException($this, $response->getMessage());
        } else {
            $this->onProtocolError('The server did not return a +QUEUED status response.');
        }

        return $this;
    }
716149
public function runCommand($command, OutputInterface $output = null)
    {
        $input = new StringInput($command);

        $command = $this->find($this->getCommandName($input));

        return $command->run($input, $output ?: new NullOutput());
    }
573324
protected function execute(CommandInterface $command, array $arguments)
	{
		return $this->container->call([$command, 'execute'], $this->convertArgumentsToCamelCase($arguments));
	}