VuFind API Documentation

Alma extends AbstractBase
in package

Alma Link Resolver Driver

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Wiki

Table of Contents

$baseUrl  : string
Base URL for link resolver
$httpClient  : Client
HTTP client
$ignoredFilterReasons  : array<string|int, mixed>
List of filter reasons that are ignored (displayed regardless of filtering)
__construct()  : mixed
Constructor
fetchLinks()  : string
Fetch Links
getResolverUrl()  : string
Get Resolver Url
parseLinks()  : array<string|int, mixed>
Parse Links
supportsMoreOptionsLink()  : bool
This controls whether a "More options" link will be shown below the fetched resolver links eventually linking to the resolver page previously being parsed.
cleanupText()  : string
Clean up textual information
getKeyWithId()  : string
Get a key with the specified id from the context_service element
mapServiceType()  : string
Map Alma service types to VuFind. Returns an empty string for an unmapped value.

Properties

$baseUrl

Base URL for link resolver

protected string $baseUrl

$httpClient

HTTP client

protected Client $httpClient

$ignoredFilterReasons

List of filter reasons that are ignored (displayed regardless of filtering)

protected array<string|int, mixed> $ignoredFilterReasons = ['Date Filter']

Methods

__construct()

Constructor

public __construct(string $baseUrl, Client $httpClient[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$baseUrl : string

Base URL for link resolver

$httpClient : Client

HTTP client

$options : array<string|int, mixed> = []

OpenURL Configuration (optional)

Return values
mixed

Fetch Links

public fetchLinks(string $openURL) : string

Fetches a set of links corresponding to an OpenURL

Parameters
$openURL : string

openURL (url-encoded)

Return values
string

Raw XML returned by resolver

getResolverUrl()

Get Resolver Url

public getResolverUrl(string $openURL) : string

Transform the OpenURL as needed to get a working link to the resolver.

Parameters
$openURL : string

openURL (url-encoded)

Return values
string

Returns resolver specific url

Parse Links

public parseLinks(string $xmlstr) : array<string|int, mixed>

Parses an XML file returned by a link resolver and converts it to a standardised format for display

Parameters
$xmlstr : string

Raw XML returned by resolver

Return values
array<string|int, mixed>

Array of values

This controls whether a "More options" link will be shown below the fetched resolver links eventually linking to the resolver page previously being parsed.

public supportsMoreOptionsLink() : bool

This is especially useful for resolver such as the JOP resolver returning XML which would not be of any immediate use for the user.

Return values
bool

cleanupText()

Clean up textual information

protected cleanupText(string $str) : string
Parameters
$str : string

Text

Return values
string

getKeyWithId()

Get a key with the specified id from the context_service element

protected getKeyWithId(SimpleXMLElement $service, string $id) : string
Parameters
$service : SimpleXMLElement

Service element

$id : string

Key id

Return values
string

mapServiceType()

Map Alma service types to VuFind. Returns an empty string for an unmapped value.

protected mapServiceType(string $serviceType) : string
Parameters
$serviceType : string

Alma service type

Return values
string

Search results