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