2017 © Pedro Peláez
 

library 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.

image

yale-web-technologies/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.

  • Monday, April 30, 2018
  • by hshyk
  • Repository
  • 8 Watchers
  • 9 Stars
  • 113 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 1 Versions
  • 69 % Grown

The 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., (*1)

Installation

composer require yale-web-technologies/iiif-manifest-generator, (*2)

Requires PHP >=8.1., (*3)

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., (*4)

<?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);

Generating Documentation

Documentation is generated through phpdocumentor. To create the documentation run the following:, (*5)

composer install
composer docs

To modify how the documentation is generated, a custom phpdoc.xml file can be provided. See the phpdocumentor configuration docs for more details., (*6)

Contributing

Developing with Docker

Build image locally and run it to execute the test suite., (*7)

docker build . -t iiif-manifest-generator
docker run iiif-manifest-generator

TODO

  • Implement Image API
  • Unit tests for Utils

The Versions

30/04 2018

dev-master

9999999-dev

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

  Sources   Download

GPL-3.0