Predis\Command\CommandInterface::parseResponse PHP Method

parseResponse() public method

Parses a raw response and returns a PHP object.
public parseResponse ( string $data ) : mixed
$data string Binary string containing the whole response.
return mixed
    public function parseResponse($data);

Usage Example

コード例 #1
0
 /**
  * Handles a response object.
  *
  * @param  ConnectionInterface     $connection
  * @param  CommandInterface        $command
  * @param  ResponseObjectInterface $response
  * @return mixed
  */
 protected function onResponseObject(ConnectionInterface $connection, CommandInterface $command, ResponseObjectInterface $response)
 {
     if ($response instanceof ResponseErrorInterface) {
         return $this->onResponseError($connection, $response);
     }
     if ($response instanceof Iterator) {
         return $command->parseResponse(iterator_to_array($response));
     }
     return $response;
 }
All Usage Examples Of Predis\Command\CommandInterface::parseResponse