IcingaObject: provide plain object
This commit is contained in:
parent
8d173b9602
commit
039542c473
|
@ -865,7 +865,7 @@ return '';
|
|||
return $class::loadAll($db, $query, $keyColumn);
|
||||
}
|
||||
|
||||
public function toJson($resolved = false)
|
||||
public function toPlainObject($resolved = false)
|
||||
{
|
||||
$props = array();
|
||||
foreach ($this->getProperties() as $k => $v) {
|
||||
|
@ -889,7 +889,12 @@ return '';
|
|||
$props['imports'] = $this->imports()->listImportNames();
|
||||
}
|
||||
|
||||
return json_encode($props);
|
||||
return (object) $props;
|
||||
}
|
||||
|
||||
public function toJson($resolved = false)
|
||||
{
|
||||
return json_encode($this->toPlainObject($resolved));
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
|
|
Loading…
Reference in New Issue