IcingaObject: allow default for getResolvedProperty

This commit is contained in:
Thomas Gelf 2016-02-28 14:37:13 +01:00
parent 7d9fefd61f
commit f9f1298bfd
1 changed files with 2 additions and 2 deletions

View File

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