You are here

protected function views_oai_pmh_plugin_style::identify_render in Views OAI-PMH 7.3

Renders a response to the 'identify' OAI-PMH request.

File

plugins/views_oai_pmh_plugin_style.inc, line 317
Contains the base OAI-PMH style plugin.

Class

views_oai_pmh_plugin_style
Views OAI-PMH_plugin style.

Code

protected function identify_render() {
  $this
    ->xml_append_verb();

  // TODO: Should use the view's query to get a more accurate value.
  $datestamp = db_query('SELECT MIN(changed) FROM {node}')
    ->fetchField();
  $elements = array(
    'repositoryName' => $this->display->handler->options['title'],
    'baseURL' => $this->request->base_url,
    'protocolVersion' => '2.0',
    'adminEmail' => variable_get('site_mail', ini_get('sendmail_from')),
    'earliestDatestamp' => gmstrftime('%Y-%m-%dT%H:%M:%SZ', $datestamp),
    'deletedRecord' => 'no',
    'granularity' => 'YYYY-MM-DDThh:mm:ssZ',
  );
  $this
    ->xml_append_children($this->xml_verb, $elements);
  $this
    ->append_oai_identifier_description($this->xml_verb);
}