Ver Fonte

Fix some more namespacing issues.

Daniele Alessandri há 14 anos atrás
pai
commit
a627b91be1
1 ficheiros alterados com 5 adições e 2 exclusões
  1. 5 2
      lib/Predis/Protocols/TextProtocol.php

+ 5 - 2
lib/Predis/Protocols/TextProtocol.php

@@ -3,6 +3,9 @@
 namespace Predis\Protocols;
 namespace Predis\Protocols;
 
 
 use Predis\ICommand;
 use Predis\ICommand;
+use Predis\ResponseError;
+use Predis\ResponseQueued;
+use Predis\ServerException;
 use Predis\CommunicationException;
 use Predis\CommunicationException;
 use Predis\Network\IConnectionComposable;
 use Predis\Network\IConnectionComposable;
 use Predis\Iterators\MultiBulkResponseSimple;
 use Predis\Iterators\MultiBulkResponseSimple;
@@ -76,9 +79,9 @@ class TextProtocol implements IRedisProtocol {
             case '-':    // error
             case '-':    // error
                 $errorMessage = substr($payload, 4);
                 $errorMessage = substr($payload, 4);
                 if ($this->_throwErrors) {
                 if ($this->_throwErrors) {
-                    throw new \Predis\ServerException($errorMessage);
+                    throw new ServerException($errorMessage);
                 }
                 }
-                return new \Predis\ResponseError($errorMessage);
+                return new ResponseError($errorMessage);
 
 
             default:
             default:
                 throw new CommunicationException(
                 throw new CommunicationException(