/** * @return array|bool associative array of the row values or false if no more row exists */ public function nextRow() { if ($this->dataIterator->nextRow()) { $row = array(); $row['submit_time'] = $this->dataIterator->row['submit_time']; $fields_with_file = null; if (isset($this->dataIterator->row['fields_with_file']) && $this->dataIterator->row['fields_with_file'] != null) { $fields_with_file = explode(',', $this->dataIterator->row['fields_with_file']); if ($this->plugin == null) { require_once 'CF7DBPlugin.php'; $this->plugin = new CF7DBPlugin(); } } foreach ($this->dataIterator->displayColumns as $aCol) { $row[$aCol] = $this->dataIterator->row[$aCol]; // If it is a file, add in the URL for it by creating a field name appended with '_URL' if ($fields_with_file && in_array($aCol, $fields_with_file)) { $row[$aCol . '_URL'] = $this->plugin->getFileUrl($row['submit_time'], $this->formName, $aCol); } } return $row; } else { return false; } }