| @@ 234-242 (lines=9) @@ | ||
| 231 | if (is_array($objectData) && count($objectData)) { |
|
| 232 | $result = array_map('self::object2array', $objectData); |
|
| 233 | } |
|
| 234 | } else { |
|
| 235 | if (is_array($object)) { |
|
| 236 | foreach ($object as $item => $value) { |
|
| 237 | $result[$item] = self::object2array($value); |
|
| 238 | } |
|
| 239 | } else { |
|
| 240 | $result = $object; |
|
| 241 | } |
|
| 242 | } |
|
| 243 | ||
| 244 | return $result; |
|
| 245 | } |
|
| @@ 259-267 (lines=9) @@ | ||
| 256 | $result = null; |
|
| 257 | if (is_object($object)) { |
|
| 258 | $result = $object->__toString(); |
|
| 259 | } else { |
|
| 260 | if (is_array($object)) { |
|
| 261 | foreach ($object as $item => $value) { |
|
| 262 | $result[$item] = self::objectToID($value); |
|
| 263 | } |
|
| 264 | } else { |
|
| 265 | $result = $object; |
|
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | return $result; |
|
| 270 | } |
|