Add MultiCurl::setXmlDecoder

This commit is contained in:
Zach Borboa
2016-01-31 10:53:32 -08:00
parent dce9acb7a2
commit ebca4c2c19
3 changed files with 46 additions and 0 deletions
+15
View File
@@ -21,6 +21,7 @@ class MultiCurl
private $options = array();
private $jsonDecoder = null;
private $xmlDecoder = null;
/**
* Construct
@@ -387,6 +388,19 @@ class MultiCurl
}
}
/**
* Set XML Decoder
*
* @access public
* @param $function
*/
public function setXmlDecoder($function)
{
if (is_callable($function)) {
$this->xmlDecoder = $function;
}
}
/**
* Set Opt
*
@@ -593,6 +607,7 @@ class MultiCurl
$curl->setHeader($key, $value);
}
$curl->setJsonDecoder($this->jsonDecoder);
$curl->setXmlDecoder($this->xmlDecoder);
$curl->call($curl->beforeSendFunction);
}
}