| @@ 170-174 (lines=5) @@ | ||
| 167 | } |
|
| 168 | ||
| 169 | if (is_array($data) === true) { |
|
| 170 | foreach ($TYPES[$result_hash] as $type_name => $type) { |
|
| 171 | if (isset($data[$type_name])) { |
|
| 172 | settype($data[$type_name], $type); |
|
| 173 | } |
|
| 174 | } |
|
| 175 | } elseif (is_object($data)) { |
|
| 176 | foreach ($TYPES[$result_hash] as $type_name => $type) { |
|
| 177 | if (isset($data->{$type_name})) { |
|
| @@ 176-180 (lines=5) @@ | ||
| 173 | } |
|
| 174 | } |
|
| 175 | } elseif (is_object($data)) { |
|
| 176 | foreach ($TYPES[$result_hash] as $type_name => $type) { |
|
| 177 | if (isset($data->{$type_name})) { |
|
| 178 | settype($data->{$type_name}, $type); |
|
| 179 | } |
|
| 180 | } |
|
| 181 | } |
|
| 182 | ||
| 183 | return $data; |
|