Snc\RedisBundle\Client\Predis\Connection\ConnectionWrapper::executeCommand PHP Method

executeCommand() public method

public executeCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface
    public function executeCommand(CommandInterface $command)
    {
        if (null === $this->logger) {
            return $this->connection->executeCommand($command);
        }
        $startTime = microtime(true);
        $result = $this->connection->executeCommand($command);
        $duration = (microtime(true) - $startTime) * 1000;
        $error = $result instanceof Error ? (string) $result : false;
        $this->logger->logCommand($this->commandToString($command), $duration, $this->getParameters()->alias, $error);
        return $result;
    }