/** * Import hosts. * * @throws Exception */ protected function processHosts() { if ($hosts = $this->getFormattedHosts()) { $hostImporter = new CHostImporter($this->options, $this->referencer); $hostImporter->import($hosts); } }
/** * Import hosts. * * @throws Exception */ protected function processHosts() { if ($this->options['hosts']['updateExisting'] || $this->options['hosts']['createMissing']) { $hosts = $this->getFormattedHosts(); if ($hosts) { $hostImporter = new CHostImporter($this->options, $this->referencer, $this->importedObjectContainer); $hostImporter->import($hosts); // get list of imported host IDs and add them processed host ID list $hostIds = $hostImporter->getProcessedHostIds(); $this->importedObjectContainer->addHostIds($hostIds); } } }