IcingaObject: allow default for getResolvedProperty
This commit is contained in:
parent
7d9fefd61f
commit
f9f1298bfd
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue