|
@@ -93,25 +93,25 @@ class Redis {
|
|
{
|
|
{
|
|
fwrite($this->connect(), $this->command($method, (array) $parameters));
|
|
fwrite($this->connect(), $this->command($method, (array) $parameters));
|
|
|
|
|
|
- $ersponse = trim(fgets($this->connection, 512));
|
|
|
|
|
|
+ $response = trim(fgets($this->connection, 512));
|
|
|
|
|
|
- switch (substr($ersponse, 0, 1))
|
|
|
|
|
|
+ switch (substr($response, 0, 1))
|
|
{
|
|
{
|
|
case '-':
|
|
case '-':
|
|
- throw new \RuntimeException('Redis error: '.substr(trim($ersponse), 4));
|
|
|
|
|
|
+ throw new \RuntimeException('Redis error: '.substr(trim($response), 4));
|
|
|
|
|
|
case '+':
|
|
case '+':
|
|
case ':':
|
|
case ':':
|
|
- return $this->inline($ersponse);
|
|
|
|
|
|
+ return $this->inline($response);
|
|
|
|
|
|
case '$':
|
|
case '$':
|
|
- return $this->bulk($ersponse);
|
|
|
|
|
|
+ return $this->bulk($response);
|
|
|
|
|
|
case '*':
|
|
case '*':
|
|
- return $this->multibulk($ersponse);
|
|
|
|
|
|
+ return $this->multibulk($response);
|
|
|
|
|
|
default:
|
|
default:
|
|
- throw new \UnexpectedValueException("Unknown response from Redis server: ".substr($ersponse, 0, 1));
|
|
|
|
|
|
+ throw new \UnexpectedValueException("Unknown Redis response: ".substr($response, 0, 1));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -261,4 +261,4 @@ class Redis {
|
|
fclose($this->connection);
|
|
fclose($this->connection);
|
|
}
|
|
}
|
|
|
|
|
|
-}
|
|
|
|
|
|
+}
|