You are here

public function BiblioEntrezPubmedArticle::setArticle in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::setArticle()
  2. 7 modules/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 pubmed/EntrezPubmedArticle.php
Stores the given SimpleXMLElement the PubMed ID and the md5 hash of the serialized XML.

File

pubmed/EntrezPubmedArticle.php, line 37
EntrezPubmedArticle.php Provides a class for handling PubMed articles retrieved with EFetch. Orginally writen by Stefan Freudenberg

Class

BiblioEntrezPubmedArticle
@file EntrezPubmedArticle.php Provides a class for handling PubMed articles retrieved with EFetch. Orginally writen by Stefan Freudenberg

Code

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