Skip to content

Commit

Permalink
chore: update README with phpdoc instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Macesker committed Feb 20, 2025
1 parent 61459f9 commit 9305803
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ composer require yale-web-technologies/iiif-manifest-generator
Requires PHP >=8.1.

### 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.
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
<?php

require_once 'iif-manifest-generator/autoload.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");
Expand All @@ -40,7 +40,16 @@ Resources are mapped to class types. Methods are available to add objects embed
$canvas->setWidth(500);
$canvas->setHeight(500);
```
See the docs folder for implementation specifications.

### Generating Documentation
Documentation is generated through [`phpdocumentor`](https://docs.phpdoc.org/). To create the documentation run the following:

```sh
composer install
vendor/bin/phpdoc
```

To modify how the documentation is generated, a custom `phpdoc.xml` file can be provided. See the [`phpdocumentor` configuration docs](https://docs.phpdoc.org/guide/getting-started/configuration.html#configuration) for more details.

### TODO ###
- Implement Image API
Expand Down

0 comments on commit 9305803

Please sign in to comment.