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