| @@ 185-196 (lines=12) @@ | ||
| 182 | if(array_keys($entity) === range(0, count($entity) - 1)) |
|
| 183 | { |
|
| 184 | $tmpCount = count($entity); |
|
| 185 | for($i = 0; $i < $tmpCount; $i++) |
|
| 186 | { |
|
| 187 | $tmpKey = $keyPrefix.'['.$i.']'; |
|
| 188 | if(is_object($entity[$i]) || is_array($entity[$i])) |
|
| 189 | { |
|
| 190 | $this->collapseEntityToArray($entity[$i], $array, $tmpKey); |
|
| 191 | } |
|
| 192 | else |
|
| 193 | { |
|
| 194 | $array[$tmpKey] = $entity[$i]; |
|
| 195 | } |
|
| 196 | } |
|
| 197 | return; |
|
| 198 | } |
|
| 199 | ||
| @@ 229-240 (lines=12) @@ | ||
| 226 | { |
|
| 227 | //Numeric array |
|
| 228 | $tmpCount = count($data); |
|
| 229 | for($j = 0; $j < $tmpCount; $j++) |
|
| 230 | { |
|
| 231 | $tmpKey = $keyPrefix.$key.'['.$j.']'; |
|
| 232 | if(is_object($data[$j]) || is_array($data[$j])) |
|
| 233 | { |
|
| 234 | $this->collapseEntityToArray($data[$j], $array, $tmpKey); |
|
| 235 | } |
|
| 236 | else |
|
| 237 | { |
|
| 238 | $array[$tmpKey] = $data[$j]; |
|
| 239 | } |
|
| 240 | } |
|
| 241 | } |
|
| 242 | } |
|
| 243 | else |
|