public static function phpToIndentedNix($obj, $indentLevel, $format)
	{
		$expr = "";

		switch(gettype($obj))
		{
			case "boolean":
				$expr .= NixGenerator::booleanToIndentedNix($obj);
				break;
			case "integer":
				$expr .= $obj;
				break;
			case "double":
				$expr .= $obj;
				break;
			case "string":
				$expr .= NixGenerator::stringToIndentedNix($obj);
				break;
			case "array":
				$expr .= NixGenerator::arrayToIndentedNix($obj, $indentLevel, $format);
				break;
			case "object":
				$expr .= NixGenerator::objectToIndentedNix($obj, $indentLevel, $format);
				break;
			case "resource":
				throw new Exception("Cannot convert a resource to a Nix expression");
				break;
			case "NULL":
				$expr .= "null";
				break;
			case "unknown type":
				throw new Exception("Cannot convert object of unknown type: ".$obj);
			default:
				throw new Exception("Encountered a totally unrecognizable type: ".$obj);
		}

		return $expr;
	}