_doiURLEncode($this->getData('doi')); } // // Get/set methods // /** * Get ID of context. * * @return int */ public function getContextId() { return $this->getData('contextId'); } /** * Set ID of context. * * @param int $contextId */ public function setContextId($contextId) { $this->setData('contextId', $contextId); } /** * Get DOI for this DOI * * @return string */ public function getDoi() { return $this->getData('doi'); } /** * Set DOI for this DOI * * @param string $doi */ public function setDoi($doi) { $this->setData('doi', $doi); } /** * Get status for this DOI * * @return int */ public function getStatus() { return $this->getData('status'); } /** * Set status for this DOI * * @param int $status */ public function setStatus($status) { $this->setData('status', $status); } /** * Encode DOI according to ANSI/NISO Z39.84-2005, Appendix E. * * */ protected function _doiURLEncode(string $pubId): string { $search = ['%', '"', '#', ' ', '<', '>', '{']; $replace = ['%25', '%22', '%23', '%20', '%3c', '%3e', '%7b']; return str_replace($search, $replace, $pubId); } } if (!PKP_STRICT_MODE) { class_alias('\PKP\doi\Doi', '\Doi'); }