Rename classes in Predis\Response and Predis\Response\Iterator.

This change aims to make class names shorter with less redundant fully
qualified names.

Merge!
This commit is contained in:
Daniele Alessandri
2013-11-16 13:02:35 +01:00
parent 1022be6010
commit b71c798f9b
43 changed files with 150 additions and 166 deletions
+5 -7
View File
@@ -18,9 +18,7 @@ use Predis\ClientInterface;
use Predis\CommunicationException;
use Predis\ExecutableContextInterface;
use Predis\NotSupportedException;
use Predis\Response\ResponseErrorInterface;
use Predis\Response\ResponseQueued;
use Predis\Response\ServerException;
use Predis\Response;
use Predis\Command\CommandInterface;
use Predis\Connection\AggregatedConnectionInterface;
use Predis\Protocol\ProtocolException;
@@ -212,7 +210,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
return $response;
}
if (!$response instanceof ResponseQueued) {
if (!$response instanceof Response\StatusQueued) {
$this->onProtocolError('The server did not respond with a QUEUED status reply');
}
@@ -388,9 +386,9 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
for ($i = 0; $i < $size; $i++) {
$commandReply = $reply[$i];
if ($commandReply instanceof ResponseErrorInterface && $useExceptions) {
if ($commandReply instanceof Response\ErrorInterface && $useExceptions) {
$message = $commandReply->getMessage();
throw new ServerException($message);
throw new Response\ServerException($message);
}
$values[$i] = $commands->dequeue()->parseResponse($commandReply);
@@ -413,7 +411,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
call_user_func($callable, $this);
} catch (CommunicationException $exception) {
$blockException = $exception;
} catch (ServerException $exception) {
} catch (Response\ServerException $exception) {
$blockException = $exception;
} catch (\Exception $exception) {
$blockException = $exception;