| @@ 399-407 (lines=9) @@ | ||
| 396 | if (is_array($objectData) && count($objectData)) { |
|
| 397 | $result = array_map('self::object2array', $objectData); |
|
| 398 | } |
|
| 399 | } else { |
|
| 400 | if (is_array($object)) { |
|
| 401 | foreach ($object as $item => $value) { |
|
| 402 | $result[$item] = self::object2array($value); |
|
| 403 | } |
|
| 404 | } else { |
|
| 405 | $result = $object; |
|
| 406 | } |
|
| 407 | } |
|
| 408 | ||
| 409 | return $result; |
|
| 410 | } |
|
| @@ 424-432 (lines=9) @@ | ||
| 421 | $result = null; |
|
| 422 | if (is_object($object)) { |
|
| 423 | $result = $object->__toString(); |
|
| 424 | } else { |
|
| 425 | if (is_array($object)) { |
|
| 426 | foreach ($object as $item => $value) { |
|
| 427 | $result[$item] = self::objectToID($value); |
|
| 428 | } |
|
| 429 | } else { //String |
|
| 430 | $result = $object; |
|
| 431 | } |
|
| 432 | } |
|
| 433 | ||
| 434 | return $result; |
|
| 435 | } |
|