Skip to content

Instantly share code, notes, and snippets.

@caseyamcl
Created December 21, 2018 18:23
Show Gist options
  • Save caseyamcl/f53ce73c220c8420fca2f2ea5b55376d to your computer and use it in GitHub Desktop.
Save caseyamcl/f53ce73c220c8420fca2f2ea5b55376d to your computer and use it in GitHub Desktop.
PHPOAIPMH example of using metadata commands in the iterator.
<?php
$myEndpoint = \Phpoaipmh\Endpoint::build('http://WHATEVER-URL-SERVICE.com/...');
foreach ($myEndpoint->listRecords('oaidc') as $item) {
$data = $item->metadata->children('http://www.openarchives.org/OAI/2.0/oai_dc/');
$rows = $data->children('http://purl.org/dc/elements/1.1/');
// .. now do whatever..
}
@saravanandos
Copy link

Thank you.Its really useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment