| @@ 549-557 (lines=9) @@ | ||
| 546 | if (is_array($objectData) && count($objectData)) { |
|
| 547 | $result = array_map('self::object2array', $objectData); |
|
| 548 | } |
|
| 549 | } else { |
|
| 550 | if (is_array($object)) { |
|
| 551 | foreach ($object as $item => $value) { |
|
| 552 | $result[$item] = self::object2array($value); |
|
| 553 | } |
|
| 554 | } else { |
|
| 555 | $result = $object; |
|
| 556 | } |
|
| 557 | } |
|
| 558 | ||
| 559 | return $result; |
|
| 560 | } |
|
| @@ 574-582 (lines=9) @@ | ||
| 571 | $result = null; |
|
| 572 | if (is_object($object)) { |
|
| 573 | $result = $object->__toString(); |
|
| 574 | } else { |
|
| 575 | if (is_array($object)) { |
|
| 576 | foreach ($object as $item => $value) { |
|
| 577 | $result[$item] = self::objectToID($value); |
|
| 578 | } |
|
| 579 | } else { //String |
|
| 580 | $result = $object; |
|
| 581 | } |
|
| 582 | } |
|
| 583 | ||
| 584 | return $result; |
|
| 585 | } |
|