/** * Get the last citation's date * * @return boolean False if errors */ public function getLastCitationDate() { if ($this->_id) { return false; } include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'citation.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'association.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'author.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'secondary.php'; $cc = new \Components\Citations\Tables\Citation($this->_db); $this->lastCitationDate = $cc->getLastCitationDate('resource', $this->_id); }
/** * Get last citation date * * @return void */ public function getLastCitationDate() { if (!$this->exists()) { return false; } if (!isset($this->_lastCitationDate)) { include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'citation.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'association.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'author.php'; include_once PATH_CORE . DS . 'components' . DS . 'com_citations' . DS . 'tables' . DS . 'secondary.php'; $cc = new \Components\Citations\Tables\Citation($this->_db); $this->_lastCitationDate = $cc->getLastCitationDate('publication', $this->get('id')); } return $this->_lastCitationDate; }