| @@ 231-252 (lines=22) @@ | ||
| 228 | * |
|
| 229 | * @return void |
|
| 230 | */ |
|
| 231 | private function __argumentDecodeUTF8_mb_convert_encoding(&$mArg) |
|
| 232 | { |
|
| 233 | if(is_array($mArg)) |
|
| 234 | { |
|
| 235 | foreach($mArg as $sKey => &$xArg) |
|
| 236 | { |
|
| 237 | $sNewKey = $sKey; |
|
| 238 | $this->__argumentDecodeUTF8_mb_convert_encoding($sNewKey); |
|
| 239 | if($sNewKey != $sKey) |
|
| 240 | { |
|
| 241 | $mArg[$sNewKey] = $xArg; |
|
| 242 | unset($mArg[$sKey]); |
|
| 243 | $sKey = $sNewKey; |
|
| 244 | } |
|
| 245 | $this->__argumentDecodeUTF8_mb_convert_encoding($xArg); |
|
| 246 | } |
|
| 247 | } |
|
| 248 | elseif(is_string($mArg)) |
|
| 249 | { |
|
| 250 | $mArg = mb_convert_encoding($mArg, $this->getOption('core.encoding'), "UTF-8"); |
|
| 251 | } |
|
| 252 | } |
|
| 253 | ||
| 254 | /** |
|
| 255 | * Decode an Jaxon request argument from UTF8 |
|
| @@ 261-284 (lines=24) @@ | ||
| 258 | * |
|
| 259 | * @return void |
|
| 260 | */ |
|
| 261 | private function __argumentDecodeUTF8_utf8_decode(&$mArg) |
|
| 262 | { |
|
| 263 | if(is_array($mArg)) |
|
| 264 | { |
|
| 265 | foreach($mArg as $sKey => &$xArg) |
|
| 266 | { |
|
| 267 | $sNewKey = $sKey; |
|
| 268 | $this->__argumentDecodeUTF8_utf8_decode($sNewKey); |
|
| 269 | ||
| 270 | if($sNewKey != $sKey) |
|
| 271 | { |
|
| 272 | $mArg[$sNewKey] = $xArg; |
|
| 273 | unset($mArg[$sKey]); |
|
| 274 | $sKey = $sNewKey; |
|
| 275 | } |
|
| 276 | ||
| 277 | $this->__argumentDecodeUTF8_utf8_decode($xArg); |
|
| 278 | } |
|
| 279 | } |
|
| 280 | elseif(is_string($mArg)) |
|
| 281 | { |
|
| 282 | $mArg = utf8_decode($mArg); |
|
| 283 | } |
|
| 284 | } |
|
| 285 | ||
| 286 | /** |
|
| 287 | * Return the method that was used to send the arguments from the client |
|