iiif_functions.php
Table of Contents
Functions
- iiif_get_canvases() : array<string|int, mixed>
- Get an array of all the canvases for the identifier ready for JSON encoding
- iiif_get_thumbnail() : array<string|int, mixed>
- Get thumbnail information for the specified resource id ready for IIIF JSON encoding
- iiif_get_image() : array<string|int, mixed>
- Get the image for the specified identifier canvas and resource id
- iiif_error() : void
- Handle a IIIF error.
- is_power_of_two() : bool
Functions
iiif_get_canvases()
Get an array of all the canvases for the identifier ready for JSON encoding
iiif_get_canvases(int $identifier, array<string|int, mixed> $iiif_results[, bool $sequencekeys = false ]) : array<string|int, mixed>
Parameters
- $identifier : int
-
IIIF identifier (this associates resources via the metadata field set as $iiif_identifier_field
- $iiif_results : array<string|int, mixed>
-
Array of ResourceSpace search results that match the $identifier, sorted
- $sequencekeys : bool = false
-
Get the array with each key matching the value set in the metadata field $iiif_sequence_field. By default the array will be sorted but have a 0 based index
Tags
Return values
array<string|int, mixed>iiif_get_thumbnail()
Get thumbnail information for the specified resource id ready for IIIF JSON encoding
iiif_get_thumbnail(int $resourceid) : array<string|int, mixed>
Parameters
- $resourceid : int
-
Resource ID
Tags
Return values
array<string|int, mixed>iiif_get_image()
Get the image for the specified identifier canvas and resource id
iiif_get_image(int $identifier, int $resourceid, string $position, array<string|int, mixed> $size_info) : array<string|int, mixed>
Parameters
- $identifier : int
-
IIIF identifier (this associates resources via the metadata field set as $iiif_identifier_field
- $resourceid : int
-
Resource ID
- $position : string
-
The canvas identifier, i.e position in the sequence. If $iiif_sequence_field is defined
- $size_info : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>iiif_error()
Handle a IIIF error.
iiif_error([int $errorcode = 404 ][, array<string|int, mixed> $errors = array() ]) : void
Parameters
- $errorcode : int = 404
-
The error code
- $errors : array<string|int, mixed> = array()
-
An array of errors
is_power_of_two()
is_power_of_two(int $x) : bool
Parameters
- $x : int