public function toArray($recursively = false) {
		if ($recursively) {
			return iterator_to_array($this->_iterator);
		}
		
		$models = [];

		foreach ($this->_iterator as $data) {
			$models[] = $this->createModel($data);
		}

		return $models;
	}
public function toArray($recursively = false) {
		if ($recursively) {
			return iterator_to_array($this->_iterator);
		}
		
		$models = [];

		foreach ($this->_iterator as $data) {
			$models[] = $this->createModel($data);
		}

		return $models;
	}
public function toArray ( $ recursively = false ) { if ( $ recursively ) { return iterator_to_array ( $ this -> _iterator ) ; } $ models = [ ] ; foreach ( $ this -> _iterator as $ data ) { $ models [ ] = $ this -> createModel ( $ data ) ; } return $ models ; }
Get an iterator's data as an array

@param  bool $recursively Models to arrays also
@return array
Get an iterator s data as an array