src/PNDP/NixGenerator.php
public static function associativeArrayToIndentedNix(array $array, $indentLevel, $format)
	{
		if(count($array) == 0)
			return "{}"; // Not strictly required, but printing an empty attribute set like this is better that putting a newline between the braces
		else
			return "{\n".NixGenerator::arrayMembersToAttrsMembers($array, $indentLevel + 1, $format).NixGenerator::generateIndentation($indentLevel, $format)."}";
	}
public static function associativeArrayToIndentedNix(array $array, $indentLevel, $format)
	{
		if(count($array) == 0)
			return "{}"; // Not strictly required, but printing an empty attribute set like this is better that putting a newline between the braces
		else
			return "{\n".NixGenerator::arrayMembersToAttrsMembers($array, $indentLevel + 1, $format).NixGenerator::generateIndentation($indentLevel, $format)."}";
	}
public static function associativeArrayToIndentedNix ( array $ array , $ indentLevel , $ format ) { if ( count ( $ array ) == 0 ) return "{}" ; // Not strictly required, but printing an empty attribute set like this is better that putting a newline between the braces else return "{\n" . NixGenerator :: arrayMembersToAttrsMembers ( $ array , $ indentLevel + 1 , $ format ) . NixGenerator :: generateIndentation ( $ indentLevel , $ format ) . "}" ; }
Converts an array to a Nix attribute set.

@param array $array Array to convert
@param int $indentLevel The indentation level of the resulting sub expression
@param bool $format Indicates whether to nicely format to expression (i.e. generating whitespaces) or not
@return A string representing the corresponding Nix list
Converts an array to a Nix attribute set .