@@ 582-590 (lines=9) @@ | ||
579 | if (is_array($objectData) && count($objectData)) { |
|
580 | $result = array_map('self::object2array', $objectData); |
|
581 | } |
|
582 | } else { |
|
583 | if (is_array($object)) { |
|
584 | foreach ($object as $item => $value) { |
|
585 | $result[$item] = self::object2array($value); |
|
586 | } |
|
587 | } else { |
|
588 | $result = $object; |
|
589 | } |
|
590 | } |
|
591 | ||
592 | return $result; |
|
593 | } |
|
@@ 607-615 (lines=9) @@ | ||
604 | $result = null; |
|
605 | if (is_object($object)) { |
|
606 | $result = $object->__toString(); |
|
607 | } else { |
|
608 | if (is_array($object)) { |
|
609 | foreach ($object as $item => $value) { |
|
610 | $result[$item] = self::objectToID($value); |
|
611 | } |
|
612 | } else { //String |
|
613 | $result = $object; |
|
614 | } |
|
615 | } |
|
616 | ||
617 | return $result; |
|
618 | } |