mirror of
https://github.com/predis/predis.git
synced 2026-08-23 23:59:34 +00:00
20 lines
459 B
PHP
20 lines
459 B
PHP
<?php
|
|
|
|
namespace Predis\Protocols;
|
|
|
|
use Predis\ResponseQueued;
|
|
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;
|
|
}
|
|
}
|
|
}
|