You are here

function Field::replace_with in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/marcParse/php-marc.php \Field::replace_with()
  2. 6 marcParse/php-marc.php \Field::replace_with()
  3. 7 modules/marcParse/php-marc.php \Field::replace_with()

Replace Field with given Field

Parameters

Field Field to replace with:

File

modules/marcParse/php-marc.php, line 921

Class

Field
Field Class Create a MARC Field object

Code

function replace_with($obj) {
  if (strtolower(get_class($obj)) == "field") {
    $this->tagno = $obj->tagno;
    $this->ind1 = $obj->ind1;
    $this->ind2 = $obj->ind2;
    $this->subfields = $obj->subfields;
    $this->is_control = $obj->is_control;
    $this->warn = $obj->warn;
    $this->data = $obj->data;
  }
  else {
    $this
      ->_croak(sprintf("Argument must be Field-object, but was '%s'", get_class($obj)));
  }
}