PHP code example of yale-web-technologies / iiif-manifest-generator

1. Go to this page and download the library: Download yale-web-technologies/iiif-manifest-generator 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/ */

    

yale-web-technologies / iiif-manifest-generator example snippets




  est = new Manifest(true);

  $manifest->setID("http://example.org/iiif/book1/manifest");
  $manifest->addLabel("Book 1");
  
  $thumbnail = new Thumbnail();
  $manifest->addThumbnail($thumbnail);
  $thumbnail->setID("http://example.org/images/book1-page1/full/80,100/0/default.jpg");
  
  $service_thumbnail = new Service();
  $thumbnail->setService($service_thumbnail);
  $service_thumbnail->setContext("http://iiif.io/api/image/2/context.json");
  $service_thumbnail->setID("http://example.org/images/book1-page1");
  $service_thumbnail->setProfile("http://iiif.io/api/image/2/level1.json");
  
  $sequence = new Sequence();
  $manifest->addSequence($sequence);
  $sequence->setID("http://example.org/iiif/book1/sequence/normal");
  $sequence->addLabel("Current Page Order");

  $canvas = new Canvas();
  $sequence->addCanvas($canvas);
  $canvas->setID("http://example.org/iiif/book1/canvas/p1");
  $canvas->addLabel("p. 1");
  $canvas->setWidth(500);
  $canvas->setHeight(500);