src/FileSaver.php
public function createOutputWithMap(array $values, array $map) {
		$output = '';
		foreach ($map as $outputLine) {
			if ($outputLine['type'] == 'empty') {
				$output .= PHP_EOL;
			} elseif($outputLine['type'] == 'comment') {
				$output .= $outputLine['value'] . PHP_EOL;
			} else {
				$output .= $this->createLine($outputLine['key'], $values[$outputLine['key']], $outputLine) . PHP_EOL;
				unset($values[$outputLine['key']]);
			}
		}

		// Add values which are not mapped at the end
		$output .= $this->createOutput($values);

		return $output;
	}
public function createOutputWithMap(array $values, array $map) {
		$output = '';
		foreach ($map as $outputLine) {
			if ($outputLine['type'] == 'empty') {
				$output .= PHP_EOL;
			} elseif($outputLine['type'] == 'comment') {
				$output .= $outputLine['value'] . PHP_EOL;
			} else {
				$output .= $this->createLine($outputLine['key'], $values[$outputLine['key']], $outputLine) . PHP_EOL;
				unset($values[$outputLine['key']]);
			}
		}

		// Add values which are not mapped at the end
		$output .= $this->createOutput($values);

		return $output;
	}
public function createOutputWithMap ( array $ values , array $ map ) { $ output = '' ; foreach ( $ map as $ outputLine ) { if ( $ outputLine [ 'type' ] == 'empty' ) { $ output .= PHP_EOL ; } elseif ( $ outputLine [ 'type' ] == 'comment' ) { $ output .= $ outputLine [ 'value' ] . PHP_EOL ; } else { $ output .= $ this -> createLine ( $ outputLine [ 'key' ] , $ values [ $ outputLine [ 'key' ] ] , $ outputLine ) . PHP_EOL ; unset ( $ values [ $ outputLine [ 'key' ] ] ) ; } } // Add values which are not mapped at the end $ output .= $ this -> createOutput ( $ values ) ; return $ output ; }
Creates output string with provided map

@param array $values Configuration values
@param array $map
@return string
Creates output string with provided map