You are here

public function BiblioEntrezPubmedArticle::setArticle in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::setArticle()
  2. 6 pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::setArticle()
  3. 7.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::setArticle()

Returns the PubMed ID of the article.

Return value

int

1 call to BiblioEntrezPubmedArticle::setArticle()
BiblioEntrezPubmedArticle::__construct in modules/pubmed/EntrezPubmedArticle.php
Stores the given SimpleXMLElement the PubMed ID and the md5 hash of the serialized XML.

File

modules/pubmed/EntrezPubmedArticle.php, line 40
Provides a class for handling PubMed articles retrieved with EFetch.

Class

BiblioEntrezPubmedArticle

Code

public function setArticle(SimpleXMLElement $pubmedArticle) {
  $this->biblio = array();
  $this->article = $pubmedArticle->MedlineCitation;
  $this->pubmeddata = $pubmedArticle->PubmedData;
  $this->id = (int) $pubmedArticle->MedlineCitation->PMID;
  $this->md5 = md5($pubmedArticle
    ->asXML());
  return $this;
}