static public function iteratorToArray(Traversable $iterator) {
		$array = [];
		
		foreach ($iterator as $key => $value) {
			if ($value instanceof Traversable) {
				$value = self::iteratorToArray($value);
			}
			
			$array[$key] = $value;
		}
		
		return $array;
	}