IcingaObject: allow default for getResolvedProperty

This commit is contained in:
Thomas Gelf 2016-02-28 14:37:13 +01:00
parent 7d9fefd61f
commit f9f1298bfd

View File

@ -355,14 +355,14 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
return $this; return $this;
} }
public function getResolvedProperty($key) public function getResolvedProperty($key, $default = null)
{ {
$properties = $this->getResolvedProperties(); $properties = $this->getResolvedProperties();
if (property_exists($properties, $key)) { if (property_exists($properties, $key)) {
return $properties->$key; return $properties->$key;
} }
return null; return $default;
} }
public function getResolvedProperties() public function getResolvedProperties()