mirror of
https://github.com/predis/predis.git
synced 2026-08-25 12:09:43 +00:00
21 lines
501 B
PHP
21 lines
501 B
PHP
<?php
|
|
|
|
namespace Predis\Protocol\Text;
|
|
|
|
use Predis\ResponseQueued;
|
|
use Predis\Protocol\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;
|
|
}
|
|
}
|
|
}
|