mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-23 05:44:37 +02:00
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…
x
Reference in New Issue
Block a user