I've been working with the OAI protocol at work so I created a Kohana module to wrap all the classes. I've only implemented a few key verbs but plan on adding the rest as needed. I've tried to make it as extensible as possible for any unseen future use.
To use the module create an Oai_Request object
// create a request object $oai = new Oai_Request( [OAI Provider Here]', Oai_Request::ListRecords, array( 'set' => 'subject:seattle', 'metadataPrefix' => 'oai_dc', ) ); // get the response by executing the request with fetch $response = $oai->fetch(); // response object contains properties about the response echo 'Record Count: ' . $response->count(); // save the response as xml or with another formatter // Formatter_None formats the file as raw $response->save('somefile.xml', new Oai_Response_Formatter_None());
I plan on writing more documentation but because the usage of this module is very specialized I figure anyone using it should be familiar with the OAI protocol. If you have any questions feel free to email at firstname.lastname@example.org.