X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2FEncoder.php;h=220ce88165a353f1f15faf99e3d39497e2ef9a19;hb=640b8c0e60bb8a13dde241ec4d23ca1f58bb5b8a;hp=160541843aabf4195dece107750f828109ba85a2;hpb=b76d21c030bcd510dce8d7e245581842c62ab6b5;p=plcapi.git diff --git a/src/Encoder.php b/src/Encoder.php index 1605418..220ce88 100644 --- a/src/Encoder.php +++ b/src/Encoder.php @@ -4,6 +4,9 @@ namespace PhpXmlRpc; use PhpXmlRpc\Helper\XMLParser; +/** + * A helper class to easily convert between Value objects and php native values + */ class Encoder { /** @@ -71,11 +74,8 @@ class Encoder return $xmlrpcVal->scalarval(); case 'array': - //$size = $xmlrpcVal->count(); $arr = array(); - //for ($i = 0; $i < $size; $i++) { foreach($xmlrpcVal as $value) { - //$arr[] = $this->decode($xmlrpcVal->arraymem($i), $options); $arr[] = $this->decode($value, $options); } @@ -292,8 +292,6 @@ class Encoder case 'methodresponse': $v = &$xmlRpcParser->_xh['value']; if ($xmlRpcParser->_xh['isf'] == 1) { - //$vc = $v->structmem('faultCode'); - //$vs = $v->structmem('faultString'); $vc = $v['faultCode']; $vs = $v['faultString']; $r = new Response(0, $vc->scalarval(), $vs->scalarval());