| @@ 476-484 (lines=9) @@ | ||
| 473 |             if (is_array($objectData) && count($objectData)) { | |
| 474 |                 $result = array_map('self::object2array', $objectData); | |
| 475 | } | |
| 476 |         } else { | |
| 477 |             if (is_array($object)) { | |
| 478 |                 foreach ($object as $item => $value) { | |
| 479 | $result[$item] = self::object2array($value); | |
| 480 | } | |
| 481 |             } else { | |
| 482 | $result = $object; | |
| 483 | } | |
| 484 | } | |
| 485 | ||
| 486 | return $result; | |
| 487 | } | |
| @@ 501-509 (lines=9) @@ | ||
| 498 | $result = null; | |
| 499 |         if (is_object($object)) { | |
| 500 | $result = $object->__toString(); | |
| 501 |         } else { | |
| 502 |             if (is_array($object)) { | |
| 503 |                 foreach ($object as $item => $value) { | |
| 504 | $result[$item] = self::objectToID($value); | |
| 505 | } | |
| 506 |             } else { //String | |
| 507 | $result = $object; | |
| 508 | } | |
| 509 | } | |
| 510 | ||
| 511 | return $result; | |
| 512 | } | |