private function extractXml($response)
    {
        /**
         * Ugly way of seeing if an attachment is present in the response.
         */
        if (strpos($response, 'application/xop+xml') === false) {
            return array($response, array('data' => null, 'mimeType' => null));
        } else {
            return $this->extractXmlAndAttachment($response);
        }
    }
private function extractXml($response)
    {
        /**
         * Ugly way of seeing if an attachment is present in the response.
         */
        if (strpos($response, 'application/xop+xml') === false) {
            return array($response, array('data' => null, 'mimeType' => null));
        } else {
            return $this->extractXmlAndAttachment($response);
        }
    }
private function extractXml ( $ response ) { /**
         * Ugly way of seeing if an attachment is present in the response.
         */ if ( strpos ( $ response , 'application/xop+xml' ) === false ) { return array ( $ response , array ( 'data' => null , 'mimeType' => null ) ) ; } else { return $ this -> extractXmlAndAttachment ( $ response ) ; } }
Extracts the XML from the response if it contains an attachment.

@param string The XML response body.

@return array first item is the XML part of response body and the second
is an attachement if one was present in the API response.
Extracts the XML from the response if it contains an attachment .