Rename the Predis\Protocols namespace to Predis\Protocol.

This commit is contained in:
Daniele Alessandri
2011-06-04 15:45:01 +02:00
parent 667ce97213
commit d59556cae1
19 changed files with 46 additions and 46 deletions
@@ -0,0 +1,21 @@
<?php
namespace Predis\Protocol\Text;
use Predis\Helpers;
use Predis\ProtocolException;
use Predis\Protocol\IResponseHandler;
use Predis\Network\IConnectionComposable;
use Predis\Iterators\MultiBulkResponseSimple;
class ResponseMultiBulkStreamHandler implements IResponseHandler {
public function handle(IConnectionComposable $connection, $lengthString) {
$length = (int) $lengthString;
if ($length != $lengthString) {
Helpers::onCommunicationException(new ProtocolException(
$connection, "Cannot parse '$length' as data length"
));
}
return new MultiBulkResponseSimple($connection, $length);
}
}