You are here

public function Record::make_clone in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/marcParse/php-marc.php \Record::make_clone()
  2. 6 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 637
@package PHP-MARC

Class

Record
Record Class Create a MARC Record class.

Code

public 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;
}