You are here

public function Record::field in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/marcParse/php-marc.php \Record::field()
  2. 6 marcParse/php-marc.php \Record::field()
  3. 7.2 modules/marcParse/php-marc.php \Record::field()

Get specific field.

Search for field in Record fields based on field name, e.g. 020

Parameters

string Field name:

Return value

Field|FALSE Return Field if found, otherwise FALSE

2 calls to Record::field()
Record::ffield in modules/marcParse/php-marc.php
Formatted representation of Field.
Record::subfield in modules/marcParse/php-marc.php
Get subfield of Field object.

File

modules/marcParse/php-marc.php, line 591
@package PHP-MARC

Class

Record
Record Class Create a MARC Record class.

Code

public function field($spec) {
  if (array_key_exists($spec, $this->fields)) {
    return $this->fields[$spec][0];
  }
  else {
    return FALSE;
  }
}