whikloj / archivematica-php
A PHP client library for Archivematica
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^7
- monolog/monolog: ^2
Requires (Dev)
- donatj/mock-webserver: ^v2
- php-vcr/php-vcr: ^1.5
- phpstan/phpstan: ^1.4
- phpunit/phpunit: ^9.5
- sebastian/phpcpd: ^6.0
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-11-16 21:07:41 UTC
README
Description
This is a PHP client library for interacting with an Archivematica instance. It requires PHP >= 7.3.
Installation
This library can installed using Composer with the command.
composer require whikloj/archivematicaPhp
Usage
The Archivematica client is made up a main ArchivematicaPhp
resource and several other object types.
These are described below:
ArchivematicaPhp
To instantiate an ArchivematicPhp instance you provide your Archivematica URL and your Storage Service URL. You will also need to set your username and API keys for either or both the Archivematica system and Storage Service.
$client = ArchivematicaPhp::create(
"http://my-archivematica.example.org",
"http://my-archivematica.example.org:62101"
)->setAMCreds(
"archivematicaUser",
"archivematicaApiKey"
)->setSSCreds(
"storageServiceUser",
"storageServiceApiKey"
);
Processing Config
You can request the current processing configuration from the server. It returns an XML document.
$config = $client->getProcessingConfig();
Other operations
Once you have an ArchivematicaPhp instance you can request any of the other objects but using their associated GET methods. ie.
- Transfers -
$client->getTransfer()
- Ingests -
$client->getIngest()
- Packages -
$client->getPackage()
- Locations -
$client->getLocation()
- Spaces -
$client->getSpace()
- Pipelines -
$client->getPipeline()