| @@ 352-360 (lines=9) @@ | ||
| 349 | if (is_array($objectData) && count($objectData)) { |
|
| 350 | $result = array_map('self::object2array', $objectData); |
|
| 351 | } |
|
| 352 | } else { |
|
| 353 | if (is_array($object)) { |
|
| 354 | foreach ($object as $item => $value) { |
|
| 355 | $result[$item] = self::object2array($value); |
|
| 356 | } |
|
| 357 | } else { |
|
| 358 | $result = $object; |
|
| 359 | } |
|
| 360 | } |
|
| 361 | ||
| 362 | return $result; |
|
| 363 | } |
|
| @@ 377-385 (lines=9) @@ | ||
| 374 | $result = null; |
|
| 375 | if (is_object($object)) { |
|
| 376 | $result = $object->__toString(); |
|
| 377 | } else { |
|
| 378 | if (is_array($object)) { |
|
| 379 | foreach ($object as $item => $value) { |
|
| 380 | $result[$item] = self::objectToID($value); |
|
| 381 | } |
|
| 382 | } else { //String |
|
| 383 | $result = $object; |
|
| 384 | } |
|
| 385 | } |
|
| 386 | ||
| 387 | return $result; |
|
| 388 | } |
|