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,22 @@
<?php
namespace Predis\Protocol\Text;
use Predis\Helpers;
use Predis\ProtocolException;
use Predis\Protocol\IResponseHandler;
use Predis\Network\IConnectionComposable;
class ResponseIntegerHandler implements IResponseHandler {
public function handle(IConnectionComposable $connection, $number) {
if (is_numeric($number)) {
return (int) $number;
}
if ($number !== 'nil') {
Helpers::onCommunicationException(new ProtocolException(
$connection, "Cannot parse '$number' as numeric response"
));
}
return null;
}
}