Selaa lähdekoodia

Fix some more namespacing issues.

Daniele Alessandri 14 vuotta sitten
vanhempi
commit
a627b91be1
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      lib/Predis/Protocols/TextProtocol.php

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

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