protected function parse($response)
        {
            switch (substr($response, 0, 1)) {
                case '-':
                    throw new Exception('Redis error: ' . substr(trim($response), 4));

                case '+':
                case ':':
                    return $this->inline($response);

                case '$':
                    return $this->bulk($response);

                case '*':
                    return $this->multibulk($response);

                default:
                    throw new Exception("Unknown Redis response: " . substr($response, 0, 1));
            }
        }
protected function parse($response)
        {
            switch (substr($response, 0, 1)) {
                case '-':
                    throw new Exception('Redis error: ' . substr(trim($response), 4));

                case '+':
                case ':':
                    return $this->inline($response);

                case '$':
                    return $this->bulk($response);

                case '*':
                    return $this->multibulk($response);

                default:
                    throw new Exception("Unknown Redis response: " . substr($response, 0, 1));
            }
        }
protected function parse ( $ response ) { switch ( substr ( $ response , 0 , 1 ) ) { case '-' : throw new Exception ( 'Redis error: ' . substr ( trim ( $ response ) , 4 ) ) ; case '+' : case ':' : return $ this -> inline ( $ response ) ; case '$' : return $ this -> bulk ( $ response ) ; case '*' : return $ this -> multibulk ( $ response ) ; default : throw new Exception ( "Unknown Redis response: " . substr ( $ response , 0 , 1 ) ) ; } }
Parse and return the response from the Redis database.

@param  string  $response
@return mixed
Parse and return the response from the Redis database .