digirati-co-uk / iiif-php

IIIF library for PHP
7 stars 2 forks source link

Collection facory #4

Closed stephenwf closed 7 years ago

stephenwf commented 7 years ago

Currently if you want to customise how lazy manifests are loaded you have to do it in two steps:

$collection = Collection::fromArray(
    fetchJson($collectionUrl)
);
$collection->setManifestLoader(function($url) {
     fetchJson($url);
});

It would be nice to be able to combine these steps.