You are here

function PARSEENTRIES::parseEntry in Bibliography Module 5

Same name and namespace in other branches
  1. 6.2 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::parseEntry()
  2. 6 bibtexParse/PARSEENTRIES.php \PARSEENTRIES::parseEntry()
  3. 7.3 plugins/biblio_style/bibtex/PARSEENTRIES.php \PARSEENTRIES::parseEntry()
  4. 7 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::parseEntry()
  5. 7.2 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::parseEntry()
1 call to PARSEENTRIES::parseEntry()
PARSEENTRIES::extractEntries in bibtexParse/PARSEENTRIES.php

File

bibtexParse/PARSEENTRIES.php, line 304

Class

PARSEENTRIES

Code

function parseEntry($entry) {
  $entry = $this->translate_latex ? $this
    ->searchReplaceText($this->transtab_latex_unicode, $entry, false) : $entry;
  $count = 0;
  $lastLine = FALSE;
  if (preg_match("/@(.*)([{(])/U", preg_quote($entry), $matches)) {
    if (!array_key_exists(1, $matches)) {
      return $lastLine;
    }
    if (preg_match("/string/i", trim($matches[1]))) {
      $this->strings[] = $entry;
    }
    else {
      if (preg_match("/preamble/i", trim($matches[1]))) {
        $this->preamble[] = $entry;
      }
      else {
        if (preg_match("/comment/i", $matches[1])) {
        }
        else {
          if ($this->fieldExtract) {
            $this
              ->fullSplit($entry);
          }
          else {
            $this->entries[$this->count] = $entry;
          }
          $this->count++;
        }
      }
    }
    return $lastLine;
  }
}