Allow specifying xml decoder options when calling Curl::setDefaultXmlDecoder

This commit is contained in:
Zach Borboa
2018-06-18 23:08:26 -07:00
parent e087a5c117
commit 2bb151e03d
3 changed files with 45 additions and 4 deletions
+8 -3
View File
@@ -35,11 +35,16 @@ class Decoder
* Decode XML
*
* @access public
* @param $response
* @param $data
* @param $class_name
* @param $options
* @param $ns
* @param $is_prefix
*/
public static function decodeXml($response)
public static function decodeXml()
{
$xml_obj = @simplexml_load_string($response);
$args = func_get_args();
$xml_obj = @call_user_func_array('simplexml_load_string', $args);
if (!($xml_obj === false)) {
$response = $xml_obj;
}