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