| @@ 426-434 (lines=9) @@ | ||
| 423 | if (is_array($objectData) && count($objectData)) { |
|
| 424 | $result = array_map('self::object2array', $objectData); |
|
| 425 | } |
|
| 426 | } else { |
|
| 427 | if (is_array($object)) { |
|
| 428 | foreach ($object as $item => $value) { |
|
| 429 | $result[$item] = self::object2array($value); |
|
| 430 | } |
|
| 431 | } else { |
|
| 432 | $result = $object; |
|
| 433 | } |
|
| 434 | } |
|
| 435 | ||
| 436 | return $result; |
|
| 437 | } |
|
| @@ 451-459 (lines=9) @@ | ||
| 448 | $result = null; |
|
| 449 | if (is_object($object)) { |
|
| 450 | $result = $object->__toString(); |
|
| 451 | } else { |
|
| 452 | if (is_array($object)) { |
|
| 453 | foreach ($object as $item => $value) { |
|
| 454 | $result[$item] = self::objectToID($value); |
|
| 455 | } |
|
| 456 | } else { //String |
|
| 457 | $result = $object; |
|
| 458 | } |
|
| 459 | } |
|
| 460 | ||
| 461 | return $result; |
|
| 462 | } |
|