You are here

public function Record::append_fields in Bibliography Module 7

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

Append field to existing.

Given Field object will be appended to the existing list of fields. Field will be appended last and not in its "correct" location.

Parameters

Field The field to append:

File

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

Class

Record
Record Class Create a MARC Record class.

Code

public function append_fields($field) {
  if (strtolower(get_class($field)) == "field") {
    $this->fields[$field->tagno][] = $field;
  }
  else {
    $this
      ->_croak(sprintf("Given argument must be Field object, but was '%s'", get_class($field)));
  }
}