ObalkyKnih
extends AbstractCover
in package
Class ObalkyKnih
Tags
Table of Contents
- $cacheAllowed : bool
- Are we allowed to cache images from this source?
- $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.
- $mandatoryBacklinkLocations : array<string|int, mixed>
- Are backlinks to source of cover mandatory?
- $service : ObalkyKnihService
- Obalky knih service
- $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)?
- __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?
- supports() : bool
- Does this plugin support the provided ID array?
- useDirectUrls() : bool
- Use direct urls? (Or proxied urls)
Properties
$cacheAllowed
Are we allowed to cache images from this source?
protected
bool
$cacheAllowed
= false
$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
$mandatoryBacklinkLocations
Are backlinks to source of cover mandatory?
protected
array<string|int, mixed>
$mandatoryBacklinkLocations
= []
$service
Obalky knih service
protected
ObalkyKnihService
$service
$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
Methods
__construct()
Constructor
public
__construct(ObalkyKnihService $service) : mixed
Parameters
- $service : ObalkyKnihService
-
Service for getting metadata from obalkyknih.cz
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
Return values
string|bool —isCacheAllowed()
Are we allowed to cache images from this source?
public
isCacheAllowed() : bool
Return values
bool —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