Import: allow for simple objects (hashes, dicts)
This commit is contained in:
parent
e317b7cf6d
commit
139b52079f
|
@ -6,6 +6,7 @@ use Icinga\Module\Director\Objects\ImportSource;
|
|||
use Icinga\Module\Director\Util;
|
||||
use Icinga\Module\Director\Web\Hook\ImportSourceHook;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use stdClass;
|
||||
|
||||
class Import
|
||||
{
|
||||
|
@ -59,6 +60,9 @@ class Import
|
|||
if (is_array($pval)) {
|
||||
$pval = json_encode($pval);
|
||||
$format = 'json';
|
||||
} elseif ($pval instanceof stdClass) {
|
||||
$pval = json_encode($pval);
|
||||
$format = 'json';
|
||||
} else {
|
||||
$format = 'string';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue