NEW: Allow hashes to be passed as ArrayList items; the will be turned into ArrayData objects.

This commit is contained in:
Sam Minnee 2012-10-16 18:24:40 +13:00 committed by Ingo Schommer
parent 9a2ba483df
commit c4dde9022d

View File

@ -55,6 +55,9 @@ class ArrayList extends ViewableData implements SS_List, SS_Filterable, SS_Sorta
* @return ArrayIterator
*/
public function getIterator() {
foreach($this->items as $i => $item) {
if(is_array($item)) $this->items[$i] = new ArrayData($item);
}
return new ArrayIterator($this->items);
}