/** * For sql or table datasources, this will iterate over the "external" DB connection * stored in this class instead of the default $DB. All other cases use the parent default. * @param object $processor the processor */ protected function get_iterator($processor) { if ($this->get_source_table() !== null) { // It's one table, return recordset iterator. return $this->get_source_db()->get_recordset($this->get_source_table(), backup_structure_dbops::convert_params_to_values($this->procparams, $processor), $this->get_source_table_sortby()); } else { if ($this->get_source_sql() !== null) { // It's one sql, return recordset iterator. return $this->get_source_db()->get_recordset_sql($this->get_source_sql(), backup_structure_dbops::convert_params_to_values($this->procparams, $processor)); } } return parent::get_iterator($processor); }