src/Quahog/Client.php
private function _parseResponse($response)
    {
        $splitResponse = explode(': ', $response);

        $idReturn = [];
        if (!$this->_inSession) {
            $filename = $splitResponse[0];
            $message = $splitResponse[1];
        }
        else {
            $idReturn = ['id' => $splitResponse[0]];
            $filename = $splitResponse[1];
            $message = $splitResponse[2];
        }

        if ($message === self::RESULT_OK) {
            return $idReturn + ['filename' => $filename, 'reason' => null, 'status' => self::RESULT_OK];
        } else {
            $parts = explode(' ', $message);
            $status = array_pop($parts);
            $reason = implode(' ', $parts);

            return $idReturn + ['filename' => $filename, 'reason' => $reason, 'status' => $status];
        }
    }
private function _parseResponse($response)
    {
        $splitResponse = explode(': ', $response);

        $idReturn = [];
        if (!$this->_inSession) {
            $filename = $splitResponse[0];
            $message = $splitResponse[1];
        }
        else {
            $idReturn = ['id' => $splitResponse[0]];
            $filename = $splitResponse[1];
            $message = $splitResponse[2];
        }

        if ($message === self::RESULT_OK) {
            return $idReturn + ['filename' => $filename, 'reason' => null, 'status' => self::RESULT_OK];
        } else {
            $parts = explode(' ', $message);
            $status = array_pop($parts);
            $reason = implode(' ', $parts);

            return $idReturn + ['filename' => $filename, 'reason' => $reason, 'status' => $status];
        }
    }
Parse the received response into a structured array ($filename, $reason, $status).

@param string $response

@return array