public function toArray($recursively = false) {
		$array = [];
		
		if ($recursively === true) {
			foreach($this->_map as $key) {
				$array[$key] = $this->getItem($key)->toArray();
			}
		} else {
			foreach($this->_map as $key) {
				$array[$key] = $this->getItem($key);
			}
		}

		return $array;
	}
public function toArray($recursively = false) {
		$array = [];
		
		if ($recursively === true) {
			foreach($this->_map as $key) {
				$array[$key] = $this->getItem($key)->toArray();
			}
		} else {
			foreach($this->_map as $key) {
				$array[$key] = $this->getItem($key);
			}
		}

		return $array;
	}
public function toArray ( $ recursively = false ) { $ array = [ ] ; if ( $ recursively === true ) { foreach ( $ this -> _map as $ key ) { $ array [ $ key ] = $ this -> getItem ( $ key ) -> toArray ( ) ; } } else { foreach ( $ this -> _map as $ key ) { $ array [ $ key ] = $ this -> getItem ( $ key ) ; } } return $ array ; }
Get collection as an array considering an order

@param  bool $recursively Models to arrays also
@return array
Get collection as an array considering an order