From c25c7ee95b427f2d221ed15c62133b7824f70d43 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 29 Feb 2016 17:36:12 +0100 Subject: [PATCH] IcingaConfigHelper: allow to render key/op/value --- library/Director/IcingaConfig/IcingaConfigHelper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/Director/IcingaConfig/IcingaConfigHelper.php b/library/Director/IcingaConfig/IcingaConfigHelper.php index de095c39..28949397 100644 --- a/library/Director/IcingaConfig/IcingaConfigHelper.php +++ b/library/Director/IcingaConfig/IcingaConfigHelper.php @@ -38,10 +38,16 @@ class IcingaConfigHelper ); public static function renderKeyValue($key, $value, $prefix = ' ') + { + return self::renderKeyOperatorValue($key, '=', $value, $prefix); + } + + public static function renderKeyOperatorValue($key, $operator, $value, $prefix = ' ') { $string = sprintf( - "%s = %s", + "%s %s %s", $key, + $operator, $value );