doesn't work '/\f/', ]; $replace = [ '\\\\\\', '\\$', '\\t', '\\r', '\\n', // '\\b', '\\f', ]; $string = preg_replace($special, $replace, $string); return $string; } /** * @param array $array * @return string */ public static function renderArray($array) { $data = []; foreach ($array as $entry) { if ($entry instanceof IcingaConfigRenderer) { // $data[] = $entry; $data[] = 'INVALID_ARRAY_MEMBER'; } else { $data[] = self::renderString($entry); } } return implode(', ', $data); } public static function renderDictionary($dictionary) { return 'INVALID_DICTIONARY'; } public static function renderExpression($string) { return 'INVALID_EXPRESSION'; } public static function alreadyRendered($string) { return new IcingaConfigRendered($string); } public static function renderInterval($interval) { if ($interval < 60) { $interval = 60; } return $interval / 60; } }