You are here

function File::warnings in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 modules/marcParse/php-marc.php \File::warnings()
  2. 7 modules/marcParse/php-marc.php \File::warnings()
  3. 7.2 modules/marcParse/php-marc.php \File::warnings()

* Get warning(s) * * Get either all warnings or a specific warning ID *

Parameters

integer ID of the warning: * @return array|string Return either Array of all warnings or specific warning

File

marcParse/php-marc.php, line 133

Class

File
Class File Class to read MARC records from file(s)

Code

function warnings($id = "") {
  if (!$id) {
    return $this->warn;
  }
  else {
    if (array_key_exists($id, $this->warn)) {
      return $this->warn[$id];
    }
    else {
      return "Invalid warning ID: {$id}";
    }
  }
}