VuFind API Documentation

Connection
in package

Resolver Connection Class

This abstract class defines the signature for the available methods for interacting with the local OpenURL Resolver. It is a cutdown version of the CatalogConnection class.

Required functions in implementing Drivers are listed in Interface.php

Tags
category

VuFind

author

Graham Seaman Graham.Seaman@rhul.ac.uk

license

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

link

Wiki

Table of Contents

$cachePath  : string
The path to the resolver cache, if any (empty string for no caching)
$driver  : object
The object of the appropriate driver.
__call()  : mixed
Default method -- pass along calls to the driver if available; return false otherwise. This allows custom functions to be implemented in the driver without constant modification to the connection class.
__construct()  : mixed
Constructor
disableCache()  : void
Disable caching.
enableCache()  : void
Enable caching.
fetchLinks()  : array<string|int, mixed>
Fetch Links

Properties

$cachePath

The path to the resolver cache, if any (empty string for no caching)

protected string $cachePath = ''

$driver

The object of the appropriate driver.

protected object $driver = false

Methods

__call()

Default method -- pass along calls to the driver if available; return false otherwise. This allows custom functions to be implemented in the driver without constant modification to the connection class.

public __call(string $methodName, array<string|int, mixed> $params) : mixed
Parameters
$methodName : string

The name of the called method.

$params : array<string|int, mixed>

Array of passed parameters.

Return values
mixed

Varies by method (false if undefined method)

__construct()

Constructor

public __construct(DriverInterface $driver) : mixed

This is responsible for instantiating the driver that has been specified.

Parameters
$driver : DriverInterface

The driver to use

Return values
mixed

disableCache()

Disable caching.

public disableCache() : void
Return values
void

enableCache()

Enable caching.

public enableCache(string $cacheDir) : void
Parameters
$cacheDir : string

Directory to use for cache.

Return values
void

Fetch Links

public fetchLinks(string $openURL) : array<string|int, mixed>

This is responsible for retrieving the valid links for a particular OpenURL. The links may be cached or fetched remotely.

If an error occurs, throw exception

Parameters
$openURL : string

The OpenURL to use

Return values
array<string|int, mixed>

An associative array with the following keys: linktype, aval, href, coverage

Search results