| Server IP : 10.10.92.66 / Your IP : 104.23.243.85 Web Server : Apache/2.4.52 (Ubuntu) System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64 User : jurnal ( 1001) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/jurnal/public_html/plugins/generic/pln/classes/ |
Upload File : |
<?php
/**
* @file classes/DepositObject.inc.php
*
* Copyright (c) 2014-2023 Simon Fraser University
* Copyright (c) 2000-2023 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file LICENSE.
*
* @class DepositObject
* @brief Basic class describing a deposit stored in the PLN
*/
class DepositObject extends DataObject {
/**
* Get the content object that's referenced by this deposit object
* @return Issue|Submission
*/
public function getContent() {
switch ($this->getObjectType()) {
case PLN_PLUGIN_DEPOSIT_OBJECT_ISSUE:
$issueDao = DAORegistry::getDAO('IssueDAO'); /** @var IssueDAO $issueDao */
return $issueDao->getById($this->getObjectId(), $this->getJournalId());
case 'PublishedArticle': // Legacy (OJS pre-3.2)
case PLN_PLUGIN_DEPOSIT_OBJECT_SUBMISSION:
$submissionDao = DAORegistry::getDAO('SubmissionDAO'); /** @var SubmissionDAO $submissionDao */
$submission = $submissionDao->getById($this->getObjectId());
if ($submission->getContextId() != $this->getJournalId()) throw new Exception('Submission context and context ID do not agree!');
return $submission;
}
throw new Exception('Unknown object type!');
}
/**
* Set the content object that's referenced by this deposit object
* @param object $content (Issue,Submission)
*/
public function setContent($content) {
if (is_a($content, PLN_PLUGIN_DEPOSIT_OBJECT_ISSUE) || is_a($content, PLN_PLUGIN_DEPOSIT_OBJECT_SUBMISSION)) {
$this->setObjectId($content->getId());
$this->setObjectType(get_class($content));
} else {
throw new Exception('Unknown content type!');
}
}
/**
* Get type of the object being referenced by this deposit object
* @return string
*/
public function getObjectType() {
return $this->getData('objectType');
}
/**
* Set type of the object being referenced by this deposit object
* @param string
*/
public function setObjectType($objectType) {
$this->setData('objectType', $objectType);
}
/**
* Get the id of the object being referenced by this deposit object
* @return int
*/
public function getObjectId() {
return $this->getData('objectId');
}
/**
* Set the id of the object being referenced by this deposit object
* @param int
*/
public function setObjectId($objectId) {
$this->setData('objectId', $objectId);
}
/**
* Get the journal id of this deposit object
* @return int
*/
public function getJournalId() {
return $this->getData('journalId');
}
/**
* Set the journal id of this deposit object
* @param int
*/
public function setJournalId($journalId) {
$this->setData('journalId', $journalId);
}
/**
* Get the id of the deposit which includes this deposit object
* @return int
*/
public function getDepositId() {
return $this->getData('depositId');
}
/**
* Set the id of the deposit which includes this deposit object
* @param int
*/
public function setDepositId($depositId) {
$this->setData('depositId', $depositId);
}
/**
* Get the date of deposit object creation
* @return DateTime
*/
public function getDateCreated() {
return $this->getData('dateCreated');
}
/**
* Set the date of deposit object creation
* @param string $dateCreated
*/
public function setDateCreated($dateCreated) {
$this->setData('dateCreated', $dateCreated);
}
/**
* Get the modification date of the deposit object
* @return string
*/
public function getDateModified() {
return $this->getData('dateModified');
}
/**
* Set the modification date of the deposit object
* @param string $dateModified
*/
public function setDateModified($dateModified) {
$this->setData('dateModified', $dateModified);
}
}