From 2007dee6c0979e7aa32182ea941fc1676fa85b5d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 19 May 2016 15:09:08 +0200 Subject: [PATCH] IcingaCommandArgument: add replaceWith method --- library/Director/Objects/IcingaCommandArgument.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/Director/Objects/IcingaCommandArgument.php b/library/Director/Objects/IcingaCommandArgument.php index 627a5b1a..be4db155 100644 --- a/library/Director/Objects/IcingaCommandArgument.php +++ b/library/Director/Objects/IcingaCommandArgument.php @@ -48,6 +48,17 @@ class IcingaCommandArgument extends IcingaObject // No log right now, we have to handle "sub-objects" } + public function replaceWith(IcingaObject $object) + { + $this->setProperties((array) $object->toPlainObject( + false, + false, + null, + false + )); + return $this; + } + public function toPlainObject( $resolved = false, $skipDefaults = false,