You are here

public function Field::data in Bibliography Module 7

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

Set/Get Data of Control field.

Sets the Data if argument given, otherwise Data returned.

Parameters

string Data to be set:

Return value

string Data of Control field if argument not given

File

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

Class

Field
Field Class Create a MARC Field object.

Code

public function data($data = "") {
  if (!$this->is_control) {
    $this
      ->_croak("data() is only allowed for tags bigger or equal to 10");
  }
  if ($data) {
    $this->data = $data;
  }
  else {
    return $this->data;
  }
}