updated FML
This commit is contained in:
		| @@ -69,6 +69,30 @@ abstract class Builder | ||||
|         return static::escapeText($element->getId(), false); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Get the 'Text' string representation of the given value | ||||
|      * | ||||
|      * @api | ||||
|      * @param string $value String value to convert to a ManiaScript 'Text' | ||||
|      * @return string | ||||
|      */ | ||||
|     public static function getText($value) | ||||
|     { | ||||
|         return '"' . (string)$value . '"'; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Get the 'Integer' string representation of the given value | ||||
|      * | ||||
|      * @api | ||||
|      * @param int $value Int value to convert to a ManiaScript 'Integer' | ||||
|      * @return string | ||||
|      */ | ||||
|     public static function getInteger($value) | ||||
|     { | ||||
|         return (string)(int)$value; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Get the 'Real' string representation of the given value | ||||
|      * | ||||
| @@ -146,7 +170,7 @@ abstract class Builder | ||||
|      * @param bool  $associative (optional) Whether the array should be associative | ||||
|      * @return string | ||||
|      */ | ||||
|     public static function getArray(array $array, $associative = false) | ||||
|     public static function getArray(array $array, $associative = true) | ||||
|     { | ||||
|         $arrayText = "["; | ||||
|         $index     = 0; | ||||
| @@ -180,6 +204,9 @@ abstract class Builder | ||||
|         if (is_bool($value)) { | ||||
|             return static::getBoolean($value); | ||||
|         } | ||||
|         if (is_array($value)) { | ||||
|             return static::getArray($value); | ||||
|         } | ||||
|         return $value; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user