huge fml update

This commit is contained in:
Steffen Schröder
2014-01-19 19:30:21 +01:00
parent 9654b26f2b
commit 771409b8eb
66 changed files with 2303 additions and 134 deletions

View File

@ -21,10 +21,24 @@ abstract class Builder {
return $labelText;
}
/**
* Escape dangerous Characters in the given Text
*
* @param string $text Text to escape
* @return string
*/
public static function escapeText($text) {
$escapedText = $text;
$dangers = array('\\', '"');
$replacements = array('\\\\', '\\"');
$escapedText = str_ireplace($dangers, $replacements, $escapedText);
return $escapedText;
}
/**
* Get the Real String-Representation of the given Value
*
* @param float $value The Float Value to convert to a ManiaScript Real
* @param float $value The Float Value to convert to a ManiaScript Real
* @return string
*/
public static function getReal($value) {