case 'dateTime.iso8601':
$xmlrpcVal->scalar = $val;
$xmlrpcVal->type = 'datetime';
- $xmlrpcVal->timestamp = \PhpXmlRpc\Helper\Date::iso8601_decode($val);
+ $xmlrpcVal->timestamp = \PhpXmlRpc\Helper\Date::iso8601Decode($val);
return $xmlrpcVal;
case 'base64':
$paramCount = $xmlrpcVal->getNumParams();
$arr = array();
for ($i = 0; $i < $paramCount; $i++) {
- $arr[] = $this->decode($xmlrpcVal->getParam($i));
+ $arr[] = $this->decode($xmlrpcVal->getParam($i), $options);
}
return $arr;
*
* @return mixed false on error, or an instance of either Value, Request or Response
*/
- public function decode_xml($xmlVal, $options = array())
+ public function decodeXml($xmlVal, $options = array())
{
// 'guestimate' encoding
$valEncoding = XMLParser::guessEncoding('', $xmlVal);
if (!in_array($valEncoding, array('UTF-8', 'US-ASCII')) && !XMLParser::hasEncoding($xmlVal)) {
if ($valEncoding == 'ISO-8859-1') {
$xmlVal = utf8_encode($xmlVal);
- }
- else {
+ } else {
if (extension_loaded('mbstring')) {
$xmlVal = mb_convert_encoding($xmlVal, 'UTF-8', $valEncoding);
} else {
return $r;
case 'methodcall':
- $m = new Request($xmlRpcParser->_xh['method']);
+ $req = new Request($xmlRpcParser->_xh['method']);
for ($i = 0; $i < count($xmlRpcParser->_xh['params']); $i++) {
- $m->addParam($xmlRpcParser->_xh['params'][$i]);
+ $req->addParam($xmlRpcParser->_xh['params'][$i]);
}
- return $m;
+ return $req;
case 'value':
return $xmlRpcParser->_xh['value'];
default: