You are here

function PARSEPAGE::init in Bibliography Module 5

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

File

bibtexParse/PARSEPAGE.php, line 31

Class

PARSEPAGE

Code

function init($item) {
  $item = trim($item);
  if ($this
    ->type1($item)) {
    return $this->return;
  }

  // else, return first number we can find
  if (preg_match("/(\\d+|[ivx]+)/i", $item, $array)) {
    return array(
      $array[1],
      FALSE,
    );
  }

  // No valid page numbers found
  return array(
    FALSE,
    FALSE,
  );
}