| @@ 349-357 (lines=9) @@ | ||
| 346 | if (is_array($objectData) && count($objectData)) { |
|
| 347 | $result = array_map('self::object2array', $objectData); |
|
| 348 | } |
|
| 349 | } else { |
|
| 350 | if (is_array($object)) { |
|
| 351 | foreach ($object as $item => $value) { |
|
| 352 | $result[$item] = self::object2array($value); |
|
| 353 | } |
|
| 354 | } else { |
|
| 355 | $result = $object; |
|
| 356 | } |
|
| 357 | } |
|
| 358 | ||
| 359 | return $result; |
|
| 360 | } |
|
| @@ 374-382 (lines=9) @@ | ||
| 371 | $result = null; |
|
| 372 | if (is_object($object)) { |
|
| 373 | $result = $object->__toString(); |
|
| 374 | } else { |
|
| 375 | if (is_array($object)) { |
|
| 376 | foreach ($object as $item => $value) { |
|
| 377 | $result[$item] = self::objectToID($value); |
|
| 378 | } |
|
| 379 | } else { //String |
|
| 380 | $result = $object; |
|
| 381 | } |
|
| 382 | } |
|
| 383 | ||
| 384 | return $result; |
|
| 385 | } |
|