burgerbibliothek / ark-management-tools
PHP library for minting / validating Archival Resource Keys (ARK) and managing Electronic Resource Citation (ERC) Records.
Package info
github.com/burgerbibliothek/ark-management-tools
pkg:composer/burgerbibliothek/ark-management-tools
0.0.15
2026-03-09 11:11 UTC
Requires
- php: ^8.3
Requires (Dev)
- phpdocumentor/shim: ^3.9
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.2
- vimeo/psalm: ^6.13
README
PHP Library for minting / validating Archival Resource Keys (ARK) and managing Electronic Resource Citation (ERC) Records.
Examples
Generate new ARK
use Burgerbibliothek\ArkManagementTools\Ark echo ARK::generate('12345', '0123456789bcdfghjkmnpqrstvwxz', 7, 'q1');
Expected possible output:
12345/q15fk5zszx
Verify ARK with NOID Check digit algorithm
use Burgerbibliothek\ArkManagementTools\Ncda echo ARK::verify('12345/q15fk5zszx', '0123456789bcdfghjkmnpqrstvwxz');
Output:
true
Split ARK into components
use Burgerbibliothek\ArkManagementTools\Ark var_dump(Ark::splitIntoComponents('https://ark.example.tld/ark:/99999/a1b2c3d4e5f6g/suffix?info'));
Output
array(7) { ["resolverService"]=> string(24) "https://ark.example.tld/" ["naan"]=> string(5) "99999" ["baseName"]=> string(13) "a1b2c3d4e5f6g" ["baseCompactName"]=> string(23) "ark:99999/a1b2c3d4e5f6g" ["checkZone"]=> string(19) "99999/a1b2c3d4e5f6g" ["suffixes"]=> string(11) "suffix?info" ["inflections"]=> array(1) { ["?info"]=> string(0) "" } }