diff --git a/application/core/timeFormatter.php b/application/core/Formatter.php similarity index 55% rename from application/core/timeFormatter.php rename to application/core/Formatter.php index 0ec1bacd..f24c4afb 100644 --- a/application/core/timeFormatter.php +++ b/application/core/Formatter.php @@ -3,11 +3,11 @@ namespace ManiaControl; /** - * Class offering methods to format times + * Class offering methods to format texts and values * - * @author Steff + * @author steeffeen & kremsy */ -class TimeFormatter { +abstract class Formatter { /** * Formats the given time (milliseconds) @@ -51,6 +51,39 @@ class TimeFormatter { public static function formatTimestamp($time) { return date("Y-m-d H:i:s", $time); } + + /** + * Strip $codes from the string + * + * @param string $string + * @return string + */ + public static function stripCodes($string) { + $string = preg_replace('/(?