You are here

public function Record::subfield in Bibliography Module 7

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

Get subfield of Field object.

Returns the value of a specific subfield of a given Field object.

Parameters

string Name of field:

string Name of subfield:

Return value

string|FALSE Return value of subfield if Field exists, otherwise FALSE

File

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

Class

Record
Record Class Create a MARC Record class.

Code

public function subfield($field, $subfield) {
  if (!($field = $this
    ->field($field))) {
    return FALSE;
  }
  else {
    return $field
      ->subfield($subfield);
  }
}