CustomVariable: add support for creating new types
This commit is contained in:
parent
5886765e37
commit
7298092e97
|
@ -128,6 +128,14 @@ abstract class CustomVariable implements IcingaConfigRenderer
|
|||
return new CustomVariableNull($key, $value);
|
||||
}
|
||||
|
||||
if (is_bool($value)) {
|
||||
return new CustomVariableBoolean($key, $value);
|
||||
}
|
||||
|
||||
if (is_int($value) || is_float($value)) {
|
||||
return new CustomVariableNumber($key, $value);
|
||||
}
|
||||
|
||||
if (is_string($value)) {
|
||||
|
||||
return new CustomVariableString($key, $value);
|
||||
|
|
Loading…
Reference in New Issue