SWORD PHP Library version 0.7 released

I have just released version 0.7 of the SWORD PHP library. It can be downloaded from http://php.swordapp.org/

This latest version adds two new features:

To show how easy it is to use the library, see the following code which requests a service document, creates a package, and then deposits it:

// Import the library
require('swordappclient.php');

// Create an instance of the client
$sac = new SWORDAPPClient();

// Request a service document
$sdr = $sac->servicedocument($url, $user, $password, $onbehalfof);

// Import the packager library
require('packager_mets_swap.php');

// Create a new package with the root and directory of the input files, and the root and directory of the package
$package = new PackagerMetsSwap($rootin, $dirin, $rootout, $fileout);

// Add metadata to the package
$package->setType($test_type);
$package->setTitle($title);
$package->setAbstract($abstract);
foreach ($creators as $creator) {
    $package->addCreator($creator);
}

// Add a file to the package
$package->addFile($filename, $mimetype);

// Now deposit the package
$dr = $sac->deposit($depositurl, $username, $password, $onbehalfof, $filename, $packageformat, $pacakgecontenttype);

Please send requests or leave a comment for features for the next version.

2 thoughts on “SWORD PHP Library version 0.7 released

  1. Pingback: Noticias Edición Digital » Blog Archive » SWORD PHP Library Version 0.7

  2. Pingback: SWORD PHP Library Version 0.7 « pintiniblog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>