Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Module for Kohana PHP Framework that implements the OAI-PMH (Open Archives Initiative Protocol for Metadata Harvesting) API
tree: d5c24e4bb2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
classes/oai
.gitignore
README.md

README.md

Background

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.

Usage

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 wadec14@gmail.com.

Something went wrong with that request. Please try again.