From dda16fd0d0a2dbebca9887ef47b3607db00fae4a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 20 Mar 2016 12:00:03 +0100 Subject: [PATCH] IcingaObject: introduce isObject helper method --- library/Director/Objects/IcingaObject.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index 70dc1552..fcb1c21a 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -83,6 +83,8 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer private $resolveCache = array(); + private $cachedPlainUnmodified; + public function propertyIsBoolean($property) { return array_key_exists($property, $this->booleans); @@ -962,6 +964,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer return parent::hasProperty($key); } + public function isObject() + { + return $this->hasProperty('object_type') + && $this->object_type === 'object'; + } + public function isTemplate() { return $this->hasProperty('object_type')