IcingaConfigHelper: allow to render key/op/value

This commit is contained in:
Thomas Gelf 2016-02-29 17:36:12 +01:00
parent 74c0fc2dc6
commit c25c7ee95b

View File

@ -38,10 +38,16 @@ class IcingaConfigHelper
); );
public static function renderKeyValue($key, $value, $prefix = ' ') public static function renderKeyValue($key, $value, $prefix = ' ')
{
return self::renderKeyOperatorValue($key, '=', $value, $prefix);
}
public static function renderKeyOperatorValue($key, $operator, $value, $prefix = ' ')
{ {
$string = sprintf( $string = sprintf(
"%s = %s", "%s %s %s",
$key, $key,
$operator,
$value $value
); );