You are here

private function BiblioEntrezPubmedArticle::abst in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::abst()
  2. 6 pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::abst()
  3. 7.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::abst()
1 call to BiblioEntrezPubmedArticle::abst()
BiblioEntrezPubmedArticle::getBiblio in modules/pubmed/EntrezPubmedArticle.php
Returns article elements as an associative array suitable for import into a biblio node.

File

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

Class

BiblioEntrezPubmedArticle

Code

private function abst() {
  if (isset($this->article->Article->Abstract)) {
    $abst = '';
    foreach ($this->article->Article->Abstract->AbstractText as $text) {
      $abst .= "<p>";
      $attrs = $text
        ->attributes();
      if (isset($attrs['Label'])) {
        $abst .= '<b>' . $attrs['Label'] . ': </b>';
      }
      $abst .= (string) $text . '</p>';
    }
    return $abst;
  }
}