mirror of
https://github.com/predis/predis.git
synced 2026-08-28 11:09:49 +00:00
Reorganize the Predis\Protocols namespace.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Predis\Protocols\Text;
|
||||
|
||||
use Predis\ResponseQueued;
|
||||
use Predis\Protocols\IResponseHandler;
|
||||
use Predis\Network\IConnectionComposable;
|
||||
|
||||
class ResponseStatusHandler implements IResponseHandler {
|
||||
public function handle(IConnectionComposable $connection, $status) {
|
||||
switch ($status) {
|
||||
case 'OK':
|
||||
return true;
|
||||
case 'QUEUED':
|
||||
return new ResponseQueued();
|
||||
default:
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user