| @@ 554-562 (lines=9) @@ | ||
| 551 | if (is_array($objectData) && count($objectData)) { |
|
| 552 | $result = array_map('self::object2array', $objectData); |
|
| 553 | } |
|
| 554 | } else { |
|
| 555 | if (is_array($object)) { |
|
| 556 | foreach ($object as $item => $value) { |
|
| 557 | $result[$item] = self::object2array($value); |
|
| 558 | } |
|
| 559 | } else { |
|
| 560 | $result = $object; |
|
| 561 | } |
|
| 562 | } |
|
| 563 | ||
| 564 | return $result; |
|
| 565 | } |
|
| @@ 579-587 (lines=9) @@ | ||
| 576 | $result = null; |
|
| 577 | if (is_object($object)) { |
|
| 578 | $result = $object->__toString(); |
|
| 579 | } else { |
|
| 580 | if (is_array($object)) { |
|
| 581 | foreach ($object as $item => $value) { |
|
| 582 | $result[$item] = self::objectToID($value); |
|
| 583 | } |
|
| 584 | } else { //String |
|
| 585 | $result = $object; |
|
| 586 | } |
|
| 587 | } |
|
| 588 | ||
| 589 | return $result; |
|
| 590 | } |
|