| @@ 491-499 (lines=9) @@ | ||
| 488 | if (is_array($objectData) && count($objectData)) { |
|
| 489 | $result = array_map('self::object2array', $objectData); |
|
| 490 | } |
|
| 491 | } else { |
|
| 492 | if (is_array($object)) { |
|
| 493 | foreach ($object as $item => $value) { |
|
| 494 | $result[$item] = self::object2array($value); |
|
| 495 | } |
|
| 496 | } else { |
|
| 497 | $result = $object; |
|
| 498 | } |
|
| 499 | } |
|
| 500 | ||
| 501 | return $result; |
|
| 502 | } |
|
| @@ 516-524 (lines=9) @@ | ||
| 513 | $result = null; |
|
| 514 | if (is_object($object)) { |
|
| 515 | $result = $object->__toString(); |
|
| 516 | } else { |
|
| 517 | if (is_array($object)) { |
|
| 518 | foreach ($object as $item => $value) { |
|
| 519 | $result[$item] = self::objectToID($value); |
|
| 520 | } |
|
| 521 | } else { //String |
|
| 522 | $result = $object; |
|
| 523 | } |
|
| 524 | } |
|
| 525 | ||
| 526 | return $result; |
|
| 527 | } |
|