You are here

function Record::make_clone in Bibliography Module 6.2

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

Clone record

Clone a record with all its Fields and subfields

Return value

Record Clone record

File

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

Class

Record
Record Class Create a MARC Record class

Code

function make_clone() {
  $clone = new Record();
  $clone
    ->leader($this->ldr);
  foreach ($this
    ->fields() as $data) {
    foreach ($data as $field) {
      $clone
        ->append_fields($field);
    }
  }
  return $clone;
}