src/ORM/ArrayList.php
public function toNestedArray()
    {
        $result = [];

        foreach ($this->items as $item) {
            if (is_object($item)) {
                if (method_exists($item, 'toMap')) {
                    $result[] = $item->toMap();
                } else {
                    $result[] = (array) $item;
                }
            } else {
                $result[] = $item;
            }
        }

        return $result;
    }
public function toNestedArray()
    {
        $result = [];

        foreach ($this->items as $item) {
            if (is_object($item)) {
                if (method_exists($item, 'toMap')) {
                    $result[] = $item->toMap();
                } else {
                    $result[] = (array) $item;
                }
            } else {
                $result[] = $item;
            }
        }

        return $result;
    }
public function toNestedArray ( ) { $ result = [ ] ; foreach ( $ this -> items as $ item ) { if ( is_object ( $ item ) ) { if ( method_exists ( $ item , 'toMap' ) ) { $ result [ ] = $ item -> toMap ( ) ; } else { $ result [ ] = ( array ) $ item ; } } else { $ result [ ] = $ item ; } } return $ result ; }
Return this list as an array and every object it as an sub array as well

@return array
Return this list as an array and every object it as an sub array as well