public function processCurlResponse($response, $contentType)
    {
        if ($response) {
            // if response is XML, return an SimpleXMLElement object
            if (0 === strpos($contentType, 'application/xml')) {
                return new \SimpleXMLElement($response);
            }

            return $response;
        }

        return false;
    }
public function processCurlResponse($response, $contentType)
    {
        if ($response) {
            // if response is XML, return an SimpleXMLElement object
            if (0 === strpos($contentType, 'application/xml')) {
                return new \SimpleXMLElement($response);
            }

            return $response;
        }

        return false;
    }
public function processCurlResponse ( $ response , $ contentType ) { if ( $ response ) { // if response is XML, return an SimpleXMLElement object if ( 0 === strpos ( $ contentType , 'application/xml' ) ) { return new \ SimpleXMLElement ( $ response ) ; } return $ response ; } return false ; }
Process the cURL response.

@param string $response
@param string $contentType

@throws \Exception If anything goes wrong on curl request

@return false|\SimpleXMLElement|string
Process the cURL response .