コード例 #1
0
 /**
  * Internal function to return an ArticleGalley object from a row.
  * @param $row array
  * @return ArticleGalley
  */
 function &_returnGalleyFromRow(&$row)
 {
     if ($row['html_galley']) {
         $galley = new ArticleHTMLGalley();
         // HTML-specific settings
         $galley->setStyleFileId($row['style_file_id']);
         if ($row['style_file_id']) {
             $galley->setStyleFile($this->articleFileDao->getArticleFile($row['style_file_id']));
         }
         // Retrieve images
         $images =& $this->getGalleyImages($row['galley_id']);
         $galley->setImageFiles($images);
     } else {
         $galley = new ArticleGalley();
     }
     $galley->setId($row['galley_id']);
     $galley->setPublicGalleyId($row['public_galley_id']);
     $galley->setArticleId($row['article_id']);
     $galley->setLocale($row['locale']);
     $galley->setFileId($row['file_id']);
     $galley->setLabel($row['label']);
     $galley->setType($row['type']);
     $galley->setSequence($row['seq']);
     $galley->setViews($row['views']);
     // ArticleFile set methods
     $galley->setFileName($row['file_name']);
     $galley->setOriginalFileName($row['original_file_name']);
     $galley->setFileType($row['file_type']);
     $galley->setFileSize($row['file_size']);
     $galley->setDateModified($this->datetimeFromDB($row['date_modified']));
     $galley->setDateUploaded($this->datetimeFromDB($row['date_uploaded']));
     //%LP% Fedora set methods (ArticleFile)
     $galley->setFedoraPid($row['fedora_pid']);
     $galley->setFedoraNamespace($row['fedora_namespace']);
     $galley->setFedoraDsid($row['fedora_dsid']);
     HookRegistry::call('ArticleGalleyDAO::_returnGalleyFromRow', array(&$galley, &$row));
     return $galley;
 }