mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-15 00:16:55 +00:00
Add MultiCurl::setXmlDecoder
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user