Source
protected function compareByStructure(array $structure, array $before, array $after, array $options): array {
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* Class for preparing difference between import file and system.
*/
class CConfigurationImportcompare {
/**
* @var array
*/
protected $options;
/**
* @var array shows which elements in import array tree contains uuid
*/
protected $uuid_structure;
/**
* @var array contains unique fields path for import entities
*/
protected $unique_fields_keys_by_type;
/**
* CConfigurationImportcompare constructor.
*
* @param array $options import options "createMissing", "updateExisting" and "deleteMissing"
*/
public function __construct(array $options) {
$this->uuid_structure = [
'template_groups' => [],
'host_groups' => [],
'templates' => [
'items' => [
'triggers' => []
],
'discovery_rules' => [
'item_prototypes' => [
'trigger_prototypes' => []
],
'trigger_prototypes' => [],
'graph_prototypes' => [],
'host_prototypes' => []
],
'dashboards' => [],
'httptests' => [],