PHP code example of omnistate / national-archives-uk

1. Go to this page and download the library: Download omnistate/national-archives-uk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

omnistate / national-archives-uk example snippets


$registry = new NationalArchivesUk($httpClient);
$papers = $registry->search(new CivilQuery(familyName: 'Smith', givenName: 'John', dated: Period::years(1770, 1780)));
$papers[0]->title;      // "John Smith, parish of birth Shute"
$papers[0]->archive;    // Devon Archives and Local Studies Service, 3483 A/PO 20/8
$papers[0]->url;        // its page in Discovery