Skip to content
PHP library to generate Manifest files
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Adding missing classes.svg Aug 25, 2017
src/IIIF reordered setter getter Apr 19, 2018
tests/IIIF/Test reordered setter getter Apr 19, 2018
.gitignore Initial composer.json Aug 14, 2017
LICENSE Adding files. Sep 22, 2016
README.md Adding thumbnail to manifest in README.md Apr 30, 2018
composer.json Initial composer.json Aug 14, 2017
iiif-autoloader.php Adding files. Sep 22, 2016
phpunit.xml Adding files. Sep 22, 2016

README.md

IIIF Manifest Generator

This is a IIIF Manifest Generator written in PHP. It implements the IIIF API Specification. Currently this only supports the Presentation API.

Installation

composer require yale-web-technologies/iiif-manifest-generator

Usage

Resources are mapped to class types. Methods are available to add objects embedded within a resource. Passing true to the constructor of a resource will make it a top level resource within the JSON.

<?php

  require_once 'iif-manifest-generator/autoload.php'; 
  $manifest = 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);

See the docs folder for implementation specifications.

TODO

  • Implement Image API
  • Unit tests for Utils
You can’t perform that action at this time.