当前位置: 首页>>代码示例>>PHP>>正文


PHP ReviewAssignment::setLastModified方法代码示例

本文整理汇总了PHP中ReviewAssignment::setLastModified方法的典型用法代码示例。如果您正苦于以下问题:PHP ReviewAssignment::setLastModified方法的具体用法?PHP ReviewAssignment::setLastModified怎么用?PHP ReviewAssignment::setLastModified使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReviewAssignment的用法示例。


在下文中一共展示了ReviewAssignment::setLastModified方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: importArticles

    function importArticles()
    {
        assert($this->xml->name == 'articles');
        $articleDAO =& DAORegistry::getDAO('ArticleDAO');
        $articles = $articleDAO->getArticlesByJournalId($this->journal->getId());
        $journalFileManager = new JournalFileManager($this->journal);
        $publicFileManager =& new PublicFileManager();
        $this->nextElement();
        while ($this->xml->name == 'article') {
            $articleXML = $this->getCurrentElementAsDom();
            $article = new Article();
            $article->setJournalId($this->journal->getId());
            $article->setUserId($this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_USER, (int) $articleXML->userId));
            $article->setSectionId($this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_SECTION, (int) $articleXML->sectionId));
            $article->setLocale((string) $articleXML->locale);
            $article->setLanguage((string) $articleXML->language);
            $article->setCommentsToEditor((string) $articleXML->commentsToEditor);
            $article->setCitations((string) $articleXML->citations);
            $article->setDateSubmitted((string) $articleXML->dateSubmitted);
            $article->setDateStatusModified((string) $articleXML->dateStatusModified);
            $article->setLastModified((string) $articleXML->lastModified);
            $article->setStatus((int) $articleXML->status);
            $article->setSubmissionProgress((int) $articleXML->submissionProgress);
            $article->setCurrentRound((int) $articleXML->currentRound);
            $article->setPages((string) $articleXML->pages);
            $article->setFastTracked((int) $articleXML->fastTracked);
            $article->setHideAuthor((int) $articleXML->hideAuthor);
            $article->setCommentsStatus((int) $articleXML->commentsStatus);
            $articleDAO->insertArticle($article);
            $oldArticleId = (int) $articleXML->oldId;
            $this->restoreDataObjectSettings($articleDAO, $articleXML->settings, 'article_settings', 'article_id', $article->getId());
            $article =& $articleDAO->getArticle($article->getId());
            // Reload article with restored settings
            $covers = $article->getFileName(null);
            if ($covers) {
                foreach ($covers as $locale => $oldCoverFileName) {
                    $sourceFile = $this->publicFolderPath . '/' . $oldCoverFileName;
                    $extension = $publicFileManager->getExtension($oldCoverFileName);
                    $destFile = 'cover_issue_' . $article->getId() . "_{$locale}.{$extension}";
                    $publicFileManager->copyJournalFile($this->journal->getId(), $sourceFile, $destFile);
                    unlink($sourceFile);
                    $article->setFileName($destFile, $locale);
                    $articleDAO->updateArticle($article);
                }
            }
            $articleFileManager = new ArticleFileManager($article->getId());
            $authorDAO =& DAORegistry::getDAO('AuthorDAO');
            foreach ($articleXML->author as $authorXML) {
                $author = new Author();
                $author->setArticleId($article->getId());
                $author->setFirstName((string) $authorXML->firstName);
                $author->setMiddleName((string) $authorXML->middleName);
                $author->setLastName((string) $authorXML->lastName);
                $author->setSuffix((string) $authorXML->suffix);
                $author->setCountry((string) $authorXML->country);
                $author->setEmail((string) $authorXML->email);
                $author->setUrl((string) $authorXML->url);
                $author->setUserGroupId($this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_GROUP, (int) $authorXML->userGroupId));
                $author->setPrimaryContact((int) $authorXML->primaryContact);
                $author->setSequence((int) $authorXML->sequence);
                $authorDAO->insertAuthor($author);
                $this->restoreDataObjectSettings($authorDAO, $authorXML->settings, 'author_settings', 'author_id', $author->getId());
                unset($author);
            }
            $articleEmailLogDAO =& DAORegistry::getDAO('ArticleEmailLogDAO');
            $emailLogsXML = array();
            foreach ($articleXML->emailLogs->emailLog as $emailLogXML) {
                array_unshift($emailLogsXML, $emailLogXML);
            }
            foreach ($emailLogsXML as $emailLogXML) {
                $emailLog = new ArticleEmailLogEntry();
                $emailLog->setAssocType(ASSOC_TYPE_ARTICLE);
                $emailLog->setAssocId($article->getId());
                $emailLog->setSenderId($this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_USER, (int) $emailLogXML->senderId));
                $emailLog->setDateSent((string) $emailLogXML->dateSent);
                $emailLog->setIPAddress((string) $emailLogXML->IPAddress);
                $emailLog->setEventType((int) $emailLogXML->eventType);
                $emailLog->setFrom((string) $emailLogXML->from);
                $emailLog->setRecipients((string) $emailLogXML->recipients);
                $emailLog->setCcs((string) $emailLogXML->ccs);
                $emailLog->setBccs((string) $emailLogXML->bccs);
                $emailLog->setSubject((string) $emailLogXML->subject);
                $emailLog->setBody((string) $emailLogXML->body);
                $articleEmailLogDAO->insertObject($emailLog);
                $this->idTranslationTable->register(INTERNAL_TRANSFER_OBJECT_ARTICLE_EMAIL_LOG, (int) $emailLogXML->oldId, $emailLog->getId());
            }
            $articleFileDAO =& DAORegistry::getDAO('ArticleFileDAO');
            foreach ($articleXML->articleFile as $articleFileXML) {
                try {
                    $articleFile = new ArticleFile();
                    $articleFile->setArticleId($article->getId());
                    $articleFile->setSourceFileId((int) $articleFileXML->sourceFileId);
                    $articleFile->setSourceRevision((int) $articleFileXML->sourceRevision);
                    $articleFile->setRevision((int) $articleFileXML->revision);
                    $articleFile->setFileName((string) $articleFileXML->fileName);
                    $articleFile->setFileType((string) $articleFileXML->fileType);
                    $articleFile->setFileSize((string) $articleFileXML->fileSize);
                    $articleFile->setOriginalFileName((string) $articleFileXML->originalFileName);
                    $articleFile->setFileStage((int) $articleFileXML->fileStage);
                    $articleFile->setAssocId($this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_ARTICLE_EMAIL_LOG, (int) $articleFileXML->assocId));
//.........这里部分代码省略.........
开发者ID:ulsdevteam,项目名称:fullJournalTransfer,代码行数:101,代码来源:XMLDisassembler.inc.php

示例2: ReviewAssignment

 /**
  * Internal function to return a review assignment object from a row.
  * @param $row array
  * @return ReviewAssignment
  */
 function &_returnReviewAssignmentFromRow(&$row)
 {
     $reviewAssignment = new ReviewAssignment();
     $reviewAssignment->setId($row['review_id']);
     $reviewAssignment->setPaperId($row['paper_id']);
     $reviewAssignment->setReviewerId($row['reviewer_id']);
     $reviewAssignment->setReviewerFullName($row['first_name'] . ' ' . $row['last_name']);
     $reviewAssignment->setRecommendation($row['recommendation']);
     $reviewAssignment->setDateAssigned($this->datetimeFromDB($row['date_assigned']));
     $reviewAssignment->setDateNotified($this->datetimeFromDB($row['date_notified']));
     $reviewAssignment->setDateConfirmed($this->datetimeFromDB($row['date_confirmed']));
     $reviewAssignment->setDateCompleted($this->datetimeFromDB($row['date_completed']));
     $reviewAssignment->setDateAcknowledged($this->datetimeFromDB($row['date_acknowledged']));
     $reviewAssignment->setDateDue($this->datetimeFromDB($row['date_due']));
     $reviewAssignment->setLastModified($this->datetimeFromDB($row['last_modified']));
     $reviewAssignment->setDeclined($row['declined']);
     $reviewAssignment->setReplaced($row['replaced']);
     $reviewAssignment->setCancelled($row['cancelled']);
     $reviewAssignment->setReviewerFileId($row['reviewer_file_id']);
     $reviewAssignment->setQuality($row['quality']);
     $reviewAssignment->setDateRated($this->datetimeFromDB($row['date_rated']));
     $reviewAssignment->setDateReminded($this->datetimeFromDB($row['date_reminded']));
     $reviewAssignment->setReminderWasAutomatic($row['reminder_was_automatic']);
     $reviewAssignment->setStage($row['stage']);
     $reviewAssignment->setReviewFileId($row['review_file_id']);
     $reviewAssignment->setReviewRevision($row['review_revision']);
     $reviewAssignment->setReviewFormId($row['review_form_id']);
     // Files
     $reviewAssignment->setReviewFile($this->paperFileDao->getPaperFile($row['review_file_id'], $row['review_revision']));
     $reviewAssignment->setReviewerFile($this->paperFileDao->getPaperFile($row['reviewer_file_id']));
     $reviewAssignment->setReviewerFileRevisions($this->paperFileDao->getPaperFileRevisions($row['reviewer_file_id']));
     $reviewAssignment->setSuppFiles($this->suppFileDao->getSuppFilesByPaper($row['paper_id']));
     // Comments
     $reviewAssignment->setMostRecentPeerReviewComment($this->paperCommentDao->getMostRecentPaperComment($row['paper_id'], COMMENT_TYPE_PEER_REVIEW, $row['review_id']));
     HookRegistry::call('ReviewAssignmentDAO::_returnReviewAssignmentFromRow', array(&$reviewAssignment, &$row));
     return $reviewAssignment;
 }
开发者ID:sedici,项目名称:ocs,代码行数:42,代码来源:ReviewAssignmentDAO.inc.php


注:本文中的ReviewAssignment::setLastModified方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。