You are here

function PARSEENTRIES::parseEntry in Bibliography Module 7.2

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

File

modules/bibtexParse/PARSEENTRIES.php, line 308

Class

PARSEENTRIES

Code

function parseEntry($entry) {
  set_time_limit(30);

  // reset the script timer to avoid timeouts
  $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;
  }
}