function run($file) { if (empty($file) || !file_exists($file)) { throw new tf_exception('Empty file'); } $response = file_get_contents($file); $xmldoc = new SimpleXMLElement($response); $this->module = core::module('sat'); $this->collection = $this->module->get_node_handle(); $this->collection->remove_all_fast(); foreach ($xmldoc->node as $node) { $this->import_node($node); } $this->collection->sync_children_count(); }