PKPSubmissionFileDAO::fromRow PHP Method

fromRow() public method

Internal function to return a SubmissionFile object from a row.
public fromRow ( $row, $fileImplementation ) : SubmissionFile
$row array
$fileImplementation string
return SubmissionFile
    function fromRow($row, $fileImplementation)
    {
        // Identify the delegate.
        $daoDelegate = $this->_getDaoDelegate($fileImplementation);
        /* @var $daoDelegate SubmissionFileDAODelegate */
        // Let the DAO delegate instantiate the file implementation.
        return $daoDelegate->fromRow($row);
    }

Usage Example

 /**
  * @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');
     }
 }
All Usage Examples Of PKPSubmissionFileDAO::fromRow