Download the PHP package ritterg/sru-ao without Composer

On this page you can find all versions of the php package ritterg/sru-ao. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sru-ao

SRU Implementation for Archives Online

Latest Stable Version License Gerold Ritter

SRU-AO is a PHP & Laravel package to facilitate the implementation of an archives-online.org compatible SRU interfaces to your archival database.

Software Requirement

Installation Steps

Just require ritterg/sru-ao within your project

  1. composer require ritterg/sru-ao
  2. make sure everything is OK by running the tests phpunit

Usage

SruQuery

archives-online.org SRU queries come in a special format like https://server.tld/SRU?operation=searchretrieve&version=1.2&query=Serverchoice%20all%20%22Switzerland%20Germany%22%20AND%20isad.date%20WITHIN%20%221000%202000%22&maximumRecords=50 The SruQuery class helps you to parse this query.

$searchparams will be an array with all the sanitized and renamed query parameters from the sru query.

Parameters

$request is the array of input parameters from the query (i.e. $_GET).

$allowedfields is an array of allowed query fields and the string they should be renamed to. Default values are

$allowedoperators is an array of allowed operators and the string they should be rewritten to. Default values are

You can override these defaults with walues that best fit your database

Result

The result is an array with all query parameters. For each parameter, there is another array with the value and the operator.

For the query above the result would be

Take these parameters and build the query for your database.

SruResponse

$xml will be an XML string suitable to return to archives-online.org.

Parameters

$results is the array of records that you want to send to archives-online.org.

archives-online.org has 13 fields per record

$totalcount is the number of total results in your database.
An SRU query contains a parameter "maximumRecords" to indicate how many results should be returned. If your query has more results, you can return the number of total results in $totalcount.

$keys is an array of alternative array keys. If your results have different keys than the standard SRU keys, you can add an array of keys to match your keys with the standard keys.

If you have e.g. German keys in your results array, a $keys array could look like this:

Check your XML-response with https://archives-online.org/srutest

Test

To run the tests, run the following command from the project folder.

Links

Credits

License

The MIT License (MIT). See the License File for more information.


All versions of sru-ao with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ritterg/sru-ao contains the following files

Loading the files please wait ....