DummyILS
extends AbstractBase
in package
A dummy ILS driver used for testing a driver with unsupported features
Tags
Table of Contents
- $config : array<string|int, mixed>
- Driver configuration
- getHolding() : array<string|int, mixed>
- Get Holding
- getPurchaseHistory() : array<string|int, mixed>
- Get Purchase History
- getStatus() : mixed
- Get Status
- getStatuses() : array<string|int, mixed>
- Get Statuses
- init() : void
- Initialize the driver.
- setConfig() : void
- Set configuration.
- throwAsIlsException() : never
- Rethrow the provided exception as an ILS exception.
Properties
$config
Driver configuration
protected
array<string|int, mixed>
$config
= []
Methods
getHolding()
Get Holding
public
getHolding(string $id[, array<string|int, mixed> $patron = null ][, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
This is responsible for retrieving the holding information of a certain record.
Parameters
- $id : string
-
The record id to retrieve the holdings for
- $patron : array<string|int, mixed> = null
-
Patron data
- $options : array<string|int, mixed> = []
-
Extra options (not currently used)
Tags
Return values
array<string|int, mixed> —On success, an associative array with the following keys: id, availability (boolean), status, location, reserve, callnumber, duedate, number, barcode.
getPurchaseHistory()
Get Purchase History
public
getPurchaseHistory(string $id) : array<string|int, mixed>
This is responsible for retrieving the acquisitions history data for the specific record (usually recently received issues of a serial).
Parameters
- $id : string
-
The record id to retrieve the info for
Tags
Return values
array<string|int, mixed> —An array with the acquisitions data on success.
getStatus()
Get Status
public
getStatus(string $id) : mixed
This is responsible for retrieving the status information of a certain record.
Parameters
- $id : string
-
The record id to retrieve the holdings for
Tags
Return values
mixed —On success, an associative array with the following keys: id, availability (boolean), status, location, reserve, callnumber.
getStatuses()
Get Statuses
public
getStatuses(array<string|int, mixed> $ids) : array<string|int, mixed>
This is responsible for retrieving the status information for a collection of records.
Parameters
- $ids : array<string|int, mixed>
-
The array of record ids to retrieve the status for
Tags
Return values
array<string|int, mixed> —An array of getStatus() return values on success.
init()
Initialize the driver.
public
init() : void
Validate configuration and perform all resource-intensive tasks needed to make the driver active.
Return values
void —setConfig()
Set configuration.
public
setConfig(array<string|int, mixed> $config) : void
Set the configuration for the driver.
Parameters
- $config : array<string|int, mixed>
-
Configuration array (usually loaded from a VuFind .ini file whose name corresponds with the driver class name).
Return values
void —throwAsIlsException()
Rethrow the provided exception as an ILS exception.
protected
throwAsIlsException(Throwable $exception[, string $msg = null ]) : never
Parameters
- $exception : Throwable
-
Exception to rethrow
- $msg : string = null
-
Override exception message (optional)