\n" .
"\t\"" . date('ymd', strtotime($record->date)) . ' ' . date('Y', strtotime($record->date)) . ' eng "' . "\n" .
$this->formatElement('042', ' ', ' ', 'a', 'dc') .
$this->formatElement('245', '0', '0', 'a', $record->titles[$record->primaryLocale]) .
$this->formatElement('720', ' ', ' ', 'a', $record->creator) .
$this->formatElement('653', ' ', ' ', 'a', $this->getLocalizedData($record->subjects, $record->primaryLocale)) .
$this->formatElement('520', ' ', ' ', 'a', $this->getLocalizedData($record->descriptions, $record->primaryLocale)) .
$this->formatElement('260', ' ', ' ', 'b', $record->publishers[$record->primaryLocale]) .
$this->formatElement('720', ' ', ' ', 'a', $this->getLocalizedData($record->contributors, $record->getPrimaryLocale)) .
$this->formatElement('260', ' ', ' ', 'c', $record->date) .
$this->formatElement('655', ' ', '7', 'a', $record->types[$record->primaryLocale]) .
$this->formatElement('856', ' ', ' ', 'q', $record->format) .
$this->formatElement('856', '4', '0', 'u', $record->url) .
$this->formatElement('786', '0', ' ', 'n', $record->sources[$record->primaryLocale] . (!empty($record->pages)?"; " . $record->pages:"")) .
$this->formatElement('546', ' ', ' ', 'a', $record->language) .
$this->formatElement('787', '0', ' ', 'n', $record->relation) .
$this->formatElement('500', ' ', ' ', 'a', $this->getLocalizedData($record->coverage, $record->primaryLocale)) .
$this->formatElement('540', ' ', ' ', 'a', $record->rights) .
"\n";
return $response;
}
/**
* Format XML for single MARC element.
* @param $id string
* @param $i1 string
* @param $i2 string
* @param $label string
* @param $value mixed
*/
function formatElement($id, $i1, $i2, $label, $value) {
if (!is_array($value)) {
$value = array($value);
}
$response = '';
foreach ($value as $v) {
$response .= "\t\n" .
"\t\t" . $this->oai->prepOutput($v) . "\n" .
"\t\n";
}
return $response;
}
}
?>