/** * @see PKPSubmissionFileDAO::fromRow() */ function fromRow($row) { if (isset($row['artwork_file_id']) && is_numeric($row['artwork_file_id'])) { return parent::fromRow($row, 'ArtworkFile'); } else { return parent::fromRow($row, 'ArticleFile'); } }
/** * @copydoc PKPSubmissionFileDAO::fromRow() */ function fromRow($row) { if (isset($row['artwork_file_id']) && is_numeric($row['artwork_file_id'])) { return parent::fromRow($row, 'SubmissionArtworkFile'); } elseif (isset($row['supplementary_file_id']) && is_numeric($row['supplementary_file_id'])) { return parent::fromRow($row, 'SupplementaryFile'); } else { return parent::fromRow($row, 'SubmissionFile'); } }
/** * @see PKPSubmissionFileDAO::fromRow() */ function &fromRow(&$row) { // Identify the appropriate file implementation for the // given row. if (isset($row['artwork_file_id']) && is_numeric($row['artwork_file_id'])) { $fileImplementation = 'ArtworkFile'; } else { $fileImplementation = 'MonographFile'; } // Let the superclass instantiate the file. return parent::fromRow($row, $fileImplementation); }