php/src/mollie/api.php
final private function convertResponseBodyToObject($body, $content_type)
	{
		/* No body to convert */
		if (empty($body)) {
			return null;
		}

		/*  Convert to Mollie_Response object or return as string. */
		if (preg_match('/(application|text)\/xml/i', $content_type)) {
			return simplexml_load_string($body, "Mollie_Response");
		}
		return $body;
	}
final private function convertResponseBodyToObject($body, $content_type)
	{
		/* No body to convert */
		if (empty($body)) {
			return null;
		}

		/*  Convert to Mollie_Response object or return as string. */
		if (preg_match('/(application|text)\/xml/i', $content_type)) {
			return simplexml_load_string($body, "Mollie_Response");
		}
		return $body;
	}
final private function convertResponseBodyToObject ( $ body , $ content_type ) { /* No body to convert */ if ( empty ( $ body ) ) { return null ; } /*  Convert to Mollie_Response object or return as string. */ if ( preg_match ( '/(application|text)\/xml/i' , $ content_type ) ) { return simplexml_load_string ( $ body , "Mollie_Response" ) ; } return $ body ; }
Convert result body to an object based on Content-Type.

@param string $body
@param string $content_type
@return mixed
Convert result body to an object based on Content - Type .