mirror of
https://github.com/predis/predis.git
synced 2026-10-12 06:47:28 +00:00
25 lines
507 B
PHP
25 lines
507 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;
|
|
}
|
|
}
|
|
}
|