@@ -168,6 +168,9 @@ discard block |
||
| 168 | 168 | return PhpXmlRpc\Helper\Charset::instance()->encodeEntitites($data, $srcEncoding, $destEncoding); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | +/** |
|
| 172 | + * @param integer $timeT |
|
| 173 | + */ |
|
| 171 | 174 | function iso8601_encode($timeT, $utc=0) |
| 172 | 175 | { |
| 173 | 176 | return PhpXmlRpc\Helper\Date::iso8601Encode($timeT, $utc); |
@@ -195,6 +198,9 @@ discard block |
||
| 195 | 198 | return $encoder->encode($phpVal, $options); |
| 196 | 199 | } |
| 197 | 200 | |
| 201 | +/** |
|
| 202 | + * @param string $xmlVal |
|
| 203 | + */ |
|
| 198 | 204 | function php_xmlrpc_decode_xml($xmlVal, $options=array()) |
| 199 | 205 | { |
| 200 | 206 | $encoder = new PhpXmlRpc\Encoder(); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $val = reset($ar); |
| 96 | 96 | $typ = key($ar); |
| 97 | 97 | |
| 98 | - return '<value>' . $this->serializedata($typ, $val) . "</value>\n"; |
|
| 98 | + return '<value>'.$this->serializedata($typ, $val)."</value>\n"; |
|
| 99 | 99 | //} |
| 100 | 100 | } |
| 101 | 101 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | // preserve back compatibility |
| 115 | 115 | |
| 116 | 116 | if (is_array($b)) { |
| 117 | - foreach($b as $id => $cont) { |
|
| 117 | + foreach ($b as $id => $cont) { |
|
| 118 | 118 | $b[$id] = $cont->scalarval(); |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -122,10 +122,10 @@ discard block |
||
| 122 | 122 | // add support for structures directly encoding php objects |
| 123 | 123 | if (is_object($b)) { |
| 124 | 124 | $t = get_object_vars($b); |
| 125 | - foreach($t as $id => $cont) { |
|
| 125 | + foreach ($t as $id => $cont) { |
|
| 126 | 126 | $t[$id] = $cont->scalarval(); |
| 127 | 127 | } |
| 128 | - foreach($t as $id => $cont) { |
|
| 128 | + foreach ($t as $id => $cont) { |
|
| 129 | 129 | @$b->$id = $cont; |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -160,17 +160,17 @@ discard block |
||
| 160 | 160 | /* Expose as global functions the ones which are now class methods */ |
| 161 | 161 | |
| 162 | 162 | /// Wrong speling, but we are adamant on backwards compatibility! |
| 163 | -function xmlrpc_encode_entitites($data, $srcEncoding='', $destEncoding='') |
|
| 163 | +function xmlrpc_encode_entitites($data, $srcEncoding = '', $destEncoding = '') |
|
| 164 | 164 | { |
| 165 | 165 | return PhpXmlRpc\Helper\Charset::instance()->encodeEntitites($data, $srcEncoding, $destEncoding); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -function iso8601_encode($timeT, $utc=0) |
|
| 168 | +function iso8601_encode($timeT, $utc = 0) |
|
| 169 | 169 | { |
| 170 | 170 | return PhpXmlRpc\Helper\Date::iso8601Encode($timeT, $utc); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | -function iso8601_decode($iDate, $utc=0) |
|
| 173 | +function iso8601_decode($iDate, $utc = 0) |
|
| 174 | 174 | { |
| 175 | 175 | return PhpXmlRpc\Helper\Date::iso8601Decode($iDate, $utc); |
| 176 | 176 | } |
@@ -180,25 +180,25 @@ discard block |
||
| 180 | 180 | return PhpXmlRpc\Helper\Http::decodeChunked($buffer); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | -function php_xmlrpc_decode($xmlrpcVal, $options=array()) |
|
| 183 | +function php_xmlrpc_decode($xmlrpcVal, $options = array()) |
|
| 184 | 184 | { |
| 185 | 185 | $encoder = new PhpXmlRpc\Encoder(); |
| 186 | 186 | return $encoder->decode($xmlrpcVal, $options); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | -function php_xmlrpc_encode($phpVal, $options=array()) |
|
| 189 | +function php_xmlrpc_encode($phpVal, $options = array()) |
|
| 190 | 190 | { |
| 191 | 191 | $encoder = new PhpXmlRpc\Encoder(); |
| 192 | 192 | return $encoder->encode($phpVal, $options); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | -function php_xmlrpc_decode_xml($xmlVal, $options=array()) |
|
| 195 | +function php_xmlrpc_decode_xml($xmlVal, $options = array()) |
|
| 196 | 196 | { |
| 197 | 197 | $encoder = new PhpXmlRpc\Encoder(); |
| 198 | 198 | return $encoder->decodeXml($xmlVal, $options); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | -function guess_encoding($httpHeader='', $xmlChunk='', $encodingPrefs=null) |
|
| 201 | +function guess_encoding($httpHeader = '', $xmlChunk = '', $encodingPrefs = null) |
|
| 202 | 202 | { |
| 203 | 203 | return PhpXmlRpc\Helper\XMLParser::guessEncoding($httpHeader, $xmlChunk, $encodingPrefs); |
| 204 | 204 | } |