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