public function __construct($db = array(), $logging = array())
 {
     $this->csv = new civicrm_import_csv();
     $this->csv->heading = FALSE;
     // the logger file name should be consistent with logger in
     // contact_importer.php otherwise it would be confusing
     $toggle = $logging == 1 ? TRUE : FALSE;
     $this->log = new civicrm_import_utils($logging['path'], $toggle);
     // invoke the parent and establish db connection
     parent::__construct($db['host'], $db['name'], $db['user'], $db['pass']);
 }
 private function reset_db()
 {
     unset($this->db);
     // re-connect
     parent::__construct($this->options['db']['host'], $this->options['db']['name'], $this->options['db']['user'], $this->options['db']['pass']);
 }