| @@ 271-279 (lines=9) @@ | ||
| 268 | if (is_array($objectData) && count($objectData)) { |
|
| 269 | $result = array_map('self::object2array', $objectData); |
|
| 270 | } |
|
| 271 | } else { |
|
| 272 | if (is_array($object)) { |
|
| 273 | foreach ($object as $item => $value) { |
|
| 274 | $result[$item] = self::object2array($value); |
|
| 275 | } |
|
| 276 | } else { |
|
| 277 | $result = $object; |
|
| 278 | } |
|
| 279 | } |
|
| 280 | ||
| 281 | return $result; |
|
| 282 | } |
|
| @@ 296-304 (lines=9) @@ | ||
| 293 | $result = null; |
|
| 294 | if (is_object($object)) { |
|
| 295 | $result = $object->__toString(); |
|
| 296 | } else { |
|
| 297 | if (is_array($object)) { |
|
| 298 | foreach ($object as $item => $value) { |
|
| 299 | $result[$item] = self::objectToID($value); |
|
| 300 | } |
|
| 301 | } else { //String |
|
| 302 | $result = $object; |
|
| 303 | } |
|
| 304 | } |
|
| 305 | ||
| 306 | return $result; |
|
| 307 | } |
|