| @@ 373-381 (lines=9) @@ | ||
| 370 | if (is_array($objectData) && count($objectData)) { |
|
| 371 | $result = array_map('self::object2array', $objectData); |
|
| 372 | } |
|
| 373 | } else { |
|
| 374 | if (is_array($object)) { |
|
| 375 | foreach ($object as $item => $value) { |
|
| 376 | $result[$item] = self::object2array($value); |
|
| 377 | } |
|
| 378 | } else { |
|
| 379 | $result = $object; |
|
| 380 | } |
|
| 381 | } |
|
| 382 | ||
| 383 | return $result; |
|
| 384 | } |
|
| @@ 398-406 (lines=9) @@ | ||
| 395 | $result = null; |
|
| 396 | if (is_object($object)) { |
|
| 397 | $result = $object->__toString(); |
|
| 398 | } else { |
|
| 399 | if (is_array($object)) { |
|
| 400 | foreach ($object as $item => $value) { |
|
| 401 | $result[$item] = self::objectToID($value); |
|
| 402 | } |
|
| 403 | } else { //String |
|
| 404 | $result = $object; |
|
| 405 | } |
|
| 406 | } |
|
| 407 | ||
| 408 | return $result; |
|
| 409 | } |
|