VuFind API Documentation

Orb extends AbstractCover
in package
implements CachingDownloaderAwareInterface Uses CachingDownloaderAwareTrait

Orb cover content loader.

Tags
category

VuFind

author

Frédéric Demians f.demians@tamil.fr

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link
https://vufind.org/wiki/development:plugins:content_provider_components

Interfaces, Classes, Traits and Enums

CachingDownloaderAwareInterface
Lightweight caching downloader aware marker interface.

Table of Contents

$apiKey  : string
API key for Orb
$apiUser  : string
API user for Orb
$cacheAllowed  : bool
Are we allowed to cache images from this source?
$cacheOptionsSection  : string
Cache Options Section. This can be overridden by child classes to declare a section in config.ini which will be parsed to override default settings.
$cachingDownloader  : CachingDownloader
Caching downloader
$directUrls  : bool
Use direct urls as image urls. When set to true, direct urls to content cover provider will be used in interface instead internal Cover/Show urls.
$downloaderCacheId  : string
Cache ID. This can be overridden by child classes if they want to use a separate cache.
$mandatoryBacklinkLocations  : array<string|int, mixed>
Are backlinks to source of cover mandatory?
$supportsIsbn  : bool
Does this plugin support ISBNs?
$supportsIsmn  : bool
Does this plugin support ISMNs?
$supportsIssn  : bool
Does this plugin support ISSNs?
$supportsNbn  : bool
Does this plugin support national bibliographies number?
$supportsOclc  : bool
Does this plugin support OCLC numbers?
$supportsRecordid  : bool
Does this plugin support getting cover by local id?
$supportsUpc  : bool
Does this plugin support UPC numbers?
$supportsUuid  : bool
Does this plugin support getting cover by UUID (Universally unique identifier)?
$url  : string
Base URL for Orb API
__construct()  : mixed
Constructor
getMandatoryBacklinkLocations()  : array<string|int, mixed>
Which location are mandatory for backlinks, available locations are the same as used for cover size determination, see coversize setting in [Content] section of config.ini
getMetadata()  : array<string|int, mixed>
Get cover metadata for a particular API key and set of IDs (or empty array).
getUrl()  : string|bool
Get image URL for a particular API key and set of IDs (or false if invalid).
isCacheAllowed()  : bool
Are we allowed to cache images from this source?
setCachingDownloader()  : void
Set caching downloader
supports()  : bool
Does this plugin support the provided ID array?
useDirectUrls()  : bool
Use direct urls? (Or proxied urls)

Properties

$apiKey

API key for Orb

protected string $apiKey

$apiUser

API user for Orb

protected string $apiUser

$cacheAllowed

Are we allowed to cache images from this source?

protected bool $cacheAllowed = false

$cacheOptionsSection

Cache Options Section. This can be overridden by child classes to declare a section in config.ini which will be parsed to override default settings.

protected string $cacheOptionsSection = null

Note that the prefix "Cache_" will be prepended on this string.

$directUrls

Use direct urls as image urls. When set to true, direct urls to content cover provider will be used in interface instead internal Cover/Show urls.

protected bool $directUrls = false

$downloaderCacheId

Cache ID. This can be overridden by child classes if they want to use a separate cache.

protected string $downloaderCacheId = 'downloader'

$mandatoryBacklinkLocations

Are backlinks to source of cover mandatory?

protected array<string|int, mixed> $mandatoryBacklinkLocations = []

$supportsIsbn

Does this plugin support ISBNs?

protected bool $supportsIsbn = false

$supportsIsmn

Does this plugin support ISMNs?

protected bool $supportsIsmn = false

$supportsIssn

Does this plugin support ISSNs?

protected bool $supportsIssn = false

$supportsNbn

Does this plugin support national bibliographies number?

protected bool $supportsNbn = false

$supportsOclc

Does this plugin support OCLC numbers?

protected bool $supportsOclc = false

$supportsRecordid

Does this plugin support getting cover by local id?

protected bool $supportsRecordid = false

$supportsUpc

Does this plugin support UPC numbers?

protected bool $supportsUpc = false

$supportsUuid

Does this plugin support getting cover by UUID (Universally unique identifier)?

protected bool $supportsUuid = false

$url

Base URL for Orb API

protected string $url

Methods

__construct()

Constructor

public __construct(string $url, string $apiUser, string $apiKey) : mixed
Parameters
$url : string

Base URL for Orb

$apiUser : string

API key for Orb

$apiKey : string

API key for Orb

Return values
mixed

getMandatoryBacklinkLocations()

Which location are mandatory for backlinks, available locations are the same as used for cover size determination, see coversize setting in [Content] section of config.ini

public getMandatoryBacklinkLocations() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMetadata()

Get cover metadata for a particular API key and set of IDs (or empty array).

public getMetadata(string $key, string $size, array<string|int, mixed> $ids) : array<string|int, mixed>
Parameters
$key : string

API key

$size : string

Size of image to load (small/medium/large)

$ids : array<string|int, mixed>

Associative array of identifiers (keys may include 'isbn' pointing to an ISBN object, 'issn' pointing to a string and 'oclc' pointing to an OCLC number string)

Return values
array<string|int, mixed>

Array with keys: url, backlink_url, backlink_text

getUrl()

Get image URL for a particular API key and set of IDs (or false if invalid).

public getUrl(string $key, string $size, array<string|int, mixed> $ids) : string|bool
Parameters
$key : string

API key

$size : string

Size of image to load (small/medium/large)

$ids : array<string|int, mixed>

Associative array of identifiers (keys may include 'isbn' pointing to an ISBN object and 'issn' pointing to a string)

Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Return values
string|bool

isCacheAllowed()

Are we allowed to cache images from this source?

public isCacheAllowed() : bool
Return values
bool

setCachingDownloader()

Set caching downloader

public setCachingDownloader( $cachingDownloader) : void
Parameters
$cachingDownloader :

CachingDownloader

Return values
void

supports()

Does this plugin support the provided ID array?

public supports(array<string|int, mixed> $ids) : bool
Parameters
$ids : array<string|int, mixed>

IDs that will later be sent to load() -- see below.

Return values
bool

useDirectUrls()

Use direct urls? (Or proxied urls)

public useDirectUrls() : bool
Return values
bool

Search results