ComposedDriver
extends AbstractMultiDriver
in package
Composed Driver.
ILS Driver for VuFind to use multiple drivers for different tasks and combine their results.
Tags
Table of Contents
- $config : array<string|int, mixed>
- Driver configuration
- $configLoader : PluginManager
- Configuration loader
- $driverCache : array<string|int, object>
- The array of cached drivers
- $driverManager : PluginManager
- ILS driver manager
- $drivers : array<string|int, string>
- The array of configured driver names.
- $driversConfigPath : string
- The path to the driver configurations relative to the config path
- $mainDriver : string
- Name of the main driver
- __call() : mixed
- Default method -- pass along calls to the driver if a source can be determined and a driver is available. Throws ILSException otherwise.
- __construct() : mixed
- Constructor
- cancelHolds() : array<string|int, mixed>
- Cancel Holds
- cancelILLRequests() : array<string|int, mixed>
- Cancel ILL Requests
- cancelStorageRetrievalRequests() : array<string|int, mixed>
- Cancel Call Slips
- changePassword() : mixed
- Change Password
- checkILLRequestIsValid() : mixed
- Check whether an ILL request is valid
- checkRequestIsValid() : mixed
- Check whether a hold or recall request is valid
- checkStorageRetrievalRequestIsValid() : mixed
- Check whether a storage retrieval request is valid
- findReserves() : mixed
- Find Reserves
- getAccountBlocks() : mixed
- Check whether the patron has any blocks on their account.
- getCancelHoldDetails() : string
- Get Cancel Hold Details
- getCancelHoldLink() : string
- Get Cancel Hold Link
- getCancelILLRequestDetails() : string
- Get Cancel ILL Request Details
- getCancelStorageRetrievalRequestDetails() : string
- Get Cancel Call Slip Details
- getConfig() : array<string|int, mixed>
- Function which specifies renew, hold and cancel settings.
- getConsortialHoldings() : array<string|int, mixed>
- Get Consortial Holdings
- getCourses() : array<string|int, mixed>
- Get Courses
- getDefaultLoginDriver() : string
- Get default login driver
- getDefaultPickUpLocation() : string
- Get Default Pick Up Location
- getDefaultRequestGroup() : string
- Get Default Request Group
- getDepartments() : array<string|int, mixed>
- Get Departments
- getFunds() : array<string|int, mixed>
- Get Funds
- getHoldDefaultRequiredDate() : int|null
- Get Default "Hold Required By" Date (as Unix timestamp) or null if unsupported
- getHolding() : array<string|int, mixed>
- Get Holding
- getHoldLink() : string
- Get Hold Link
- getILLPickupLibraries() : bool|array<string|int, mixed>
- Get ILL Pickup Libraries
- getILLPickupLocations() : bool|array<string|int, mixed>
- Get ILL Pickup Locations
- getInstructors() : array<string|int, mixed>
- Get Instructors
- getLoginDrivers() : array<string|int, string>
- Get available login targets (drivers enabled for login)
- getMyFines() : mixed
- Get Patron Fines
- getMyHolds() : mixed
- Get Patron Holds
- getMyILLRequests() : mixed
- Get Patron ILL Requests
- getMyProfile() : mixed
- Get Patron Profile
- getMyStorageRetrievalRequests() : mixed
- Get Patron Call Slips
- getMyTransactionHistory() : array<string|int, mixed>
- Get Patron Loan History
- getMyTransactions() : mixed
- Get Patron Transactions
- getNewItems() : array<string|int, mixed>
- Get New Items
- getOfflineMode() : string
- Get Offline Mode
- getPickUpLocations() : array<string|int, mixed>
- Get Pick Up Locations
- getProxiedUsers() : array<string|int, mixed>
- Get list of users for whom the provided patron is a proxy.
- getPurchaseHistory() : array<string|int, mixed>
- Get Purchase History
- getRenewDetails() : string
- Get Renew Details
- getRequestBlocks() : mixed
- Check whether the patron is blocked from placing requests (holds/ILL/SRR).
- getRequestGroups() : array<string|int, mixed>
- Get request groups
- getStatus() : mixed
- Get Status
- getStatuses() : array<string|int, mixed>
- Get Statuses
- getSuppressedAuthorityRecords() : array<string|int, mixed>
- Get suppressed authority records
- getSuppressedRecords() : array<string|int, mixed>
- Get suppressed records.
- getUrlsForRecord() : array<string|int, mixed>
- Provide an array of URL data (in the same format returned by the record driver's getURLs method) for the specified bibliographic record.
- hasHoldings() : bool
- Has Holdings
- init() : void
- Initialize the driver.
- loginIsHidden() : bool
- Get Hidden Login Mode
- patronLogin() : mixed
- Patron Login
- placeHold() : mixed
- Place Hold
- placeILLRequest() : mixed
- Place ILL Request
- placeStorageRetrievalRequest() : mixed
- Place Storage Retrieval Request
- purgeTransactionHistory() : array<string|int, mixed>
- Purge Patron Transaction History
- renewMyItems() : array<string|int, mixed>
- Renew My Items
- renewMyItemsLink() : string
- Renew My Items Link
- setConfig() : void
- Set configuration.
- supportsMethod() : bool
- Helper method to determine whether or not a certain method can be called on this driver. Required method for any smart drivers.
- updateHolds() : array<string|int, mixed>
- Update holds
- callDriverMethod() : mixed
- Calling a function of a driver
- combineArraysOfAssociativeArrays() : mixed
- Used for methods where the result is a list of items. Calls the method for the main driver and all support drivers. Then adds specified fields of the support drivers to the main driver's result.
- combineMultipleArraysOfAssociativeArrays() : mixed
- Used for methods where the result is a list of lists of items. Calls the method for the main driver and all support drivers. Then adds specified fields of the support drivers to the main driver's result.
- createDriver() : mixed
- Create a driver with the given name.
- debug() : void
- Log a debug message.
- defaultCall() : mixed
- Simply calls the method for the specified main driver
- driverSupportsMethod() : bool
- Check whether the given driver supports the given method
- extractKey() : array<string|int, mixed>
- Takes an array of item as input and creates an associative array using specified fields of the items as key
- extractResultSubfields() : array<string|int, mixed>
- Extracts results from support drivers where the result can be split into named subfields.
- getDriver() : mixed
- Find the correct driver for the correct configuration file with the given name and cache an initialized copy of it.
- getDriverConfig() : array<string|int, mixed>
- Get configuration for the ILS driver. We will load an .ini file named after the driver class and number if it exists; otherwise we will return an empty array.
- getMainDriverNameForMethod() : string
- Determines which driver should be used for the specified method
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
- mergeAssociativeArrays() : array<string|int, mixed>
- Merges results of the main and the support drivers on the specified key
- mergeInSubfields() : array<string|int, mixed>
- Merges results where the result can be split into named subfields.
- mergeSingleArrayResults() : array<string|int, mixed>
- Used for methods that return associative arrays. Calls the method for the main and support drivers and merges the results. Only uses the specified support fields of the support drivers.
- throwAsIlsException() : never
- Rethrow the provided exception as an ILS exception.
Properties
$config
Driver configuration
protected
array<string|int, mixed>
$config
= []
$configLoader
Configuration loader
protected
PluginManager
$configLoader
$driverCache
The array of cached drivers
protected
array<string|int, object>
$driverCache
= []
$driverManager
ILS driver manager
protected
PluginManager
$driverManager
$drivers
The array of configured driver names.
protected
array<string|int, string>
$drivers
= []
$driversConfigPath
The path to the driver configurations relative to the config path
protected
string
$driversConfigPath
$mainDriver
Name of the main driver
protected
string
$mainDriver
Methods
__call()
Default method -- pass along calls to the driver if a source can be determined and a driver is available. Throws ILSException otherwise.
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
Tags
Return values
mixed —Varies by method
__construct()
Constructor
public
__construct(PluginManager $configLoader, PluginManager $dm) : mixed
Parameters
- $configLoader : PluginManager
-
Configuration loader
- $dm : PluginManager
-
ILS driver manager
Return values
mixed —cancelHolds()
Cancel Holds
public
cancelHolds(array<string|int, mixed> $cancelDetails) : array<string|int, mixed>
Attempts to Cancel a hold or recall on a particular item. The data in $cancelDetails['details'] is determined by getCancelHoldDetails().
Parameters
- $cancelDetails : array<string|int, mixed>
-
An array of item and patron data
Return values
array<string|int, mixed> —An array of data on each request including whether or not it was successful and a system message (if available)
cancelILLRequests()
Cancel ILL Requests
public
cancelILLRequests(array<string|int, mixed> $cancelDetails) : array<string|int, mixed>
Attempts to Cancel an ILL request on a particular item. The data in $cancelDetails['details'] is determined by getCancelILLRequestDetails().
Parameters
- $cancelDetails : array<string|int, mixed>
-
An array of item and patron data
Return values
array<string|int, mixed> —An array of data on each request including whether or not it was successful and a system message (if available)
cancelStorageRetrievalRequests()
Cancel Call Slips
public
cancelStorageRetrievalRequests(array<string|int, mixed> $cancelDetails) : array<string|int, mixed>
Attempts to Cancel a call slip on a particular item. The data in $cancelDetails['details'] is determined by getCancelStorageRetrievalRequestDetails().
Parameters
- $cancelDetails : array<string|int, mixed>
-
An array of item and patron data
Return values
array<string|int, mixed> —An array of data on each request including whether or not it was successful and a system message (if available)
changePassword()
Change Password
public
changePassword(array<string|int, mixed> $details) : mixed
Attempts to change patron password (PIN code)
Parameters
- $details : array<string|int, mixed>
-
An array of patron id and old and new password
Return values
mixed —An array of data on the request including whether or not it was successful and a system message (if available)
checkILLRequestIsValid()
Check whether an ILL request is valid
public
checkILLRequestIsValid(string $id, array<string|int, mixed> $data, array<string|int, mixed> $patron) : mixed
This is responsible for determining if an item is requestable
Parameters
- $id : string
-
The Bib ID
- $data : array<string|int, mixed>
-
An Array of item data
- $patron : array<string|int, mixed>
-
An array of patron data
Return values
mixed —An array of data on the request including whether or not it is valid and a status message. Alternatively a boolean true if request is valid, false if not.
checkRequestIsValid()
Check whether a hold or recall request is valid
public
checkRequestIsValid(string $id, array<string|int, mixed> $data, array<string|int, mixed> $patron) : mixed
This is responsible for determining if an item is requestable
Parameters
- $id : string
-
The Bib ID
- $data : array<string|int, mixed>
-
An Array of item data
- $patron : array<string|int, mixed>
-
An array of patron data
Return values
mixed —An array of data on the request including whether or not it is valid and a status message. Alternatively a boolean true if request is valid, false if not.
checkStorageRetrievalRequestIsValid()
Check whether a storage retrieval request is valid
public
checkStorageRetrievalRequestIsValid(string $id, array<string|int, mixed> $data, array<string|int, mixed> $patron) : mixed
This is responsible for determining if an item is requestable
Parameters
- $id : string
-
The Bib ID
- $data : array<string|int, mixed>
-
An Array of item data
- $patron : array<string|int, mixed>
-
An array of patron data
Return values
mixed —An array of data on the request including whether or not it is valid and a status message. Alternatively a boolean true if request is valid, false if not.
findReserves()
Find Reserves
public
findReserves(string $course, string $inst, string $dept) : mixed
Obtain information on course reserves.
Parameters
- $course : string
-
ID from getCourses (empty string to match all)
- $inst : string
-
ID from getInstructors (empty string to match all)
- $dept : string
-
ID from getDepartments (empty string to match all)
Return values
mixed —An array of associative arrays representing reserve items
getAccountBlocks()
Check whether the patron has any blocks on their account.
public
getAccountBlocks(array<string|int, mixed> $patron) : mixed
Parameters
- $patron : array<string|int, mixed>
-
Patron data from patronLogin().
Return values
mixed —A boolean false if no blocks are in place and an array of block reasons if blocks are in place
getCancelHoldDetails()
Get Cancel Hold Details
public
getCancelHoldDetails(array<string|int, mixed> $hold[, array<string|int, mixed> $patron = [] ]) : string
In order to cancel a hold, the ILS requires some information on the hold. This function returns the required information, which is then submitted as form data in Hold.php. This value is then extracted by the CancelHolds function.
Parameters
- $hold : array<string|int, mixed>
-
A single hold array from getMyHolds
- $patron : array<string|int, mixed> = []
-
Patron information from patronLogin
Return values
string —Data for use in a form field
getCancelHoldLink()
Get Cancel Hold Link
public
getCancelHoldLink(array<string|int, mixed> $holdDetails, array<string|int, mixed> $patron) : string
Parameters
- $holdDetails : array<string|int, mixed>
-
Hold Details
- $patron : array<string|int, mixed>
-
Patron
Return values
string —URL to native OPAC
getCancelILLRequestDetails()
Get Cancel ILL Request Details
public
getCancelILLRequestDetails(array<string|int, mixed> $details) : string
In order to cancel an ILL request, the ILS requires some information on the request. This function returns the required information, which is then submitted as form data. This value is then extracted by the CancelILLRequests function.
Parameters
- $details : array<string|int, mixed>
-
An array of item data
Return values
string —Data for use in a form field
getCancelStorageRetrievalRequestDetails()
Get Cancel Call Slip Details
public
getCancelStorageRetrievalRequestDetails(array<string|int, mixed> $details) : string
In order to cancel a call slip, the ILS requires some information on it. This function returns the required information, which is then submitted as form data. This value is then extracted by the CancelStorageRetrievalRequests function.
Parameters
- $details : array<string|int, mixed>
-
An array of item data
Return values
string —Data for use in a form field
getConfig()
Function which specifies renew, hold and cancel settings.
public
getConfig(string $function[, array<string|int, mixed> $params = null ]) : array<string|int, mixed>
Parameters
- $function : string
-
The name of the feature to be checked
- $params : array<string|int, mixed> = null
-
Optional feature-specific parameters (array)
Return values
array<string|int, mixed> —An array with key-value pairs.
getConsortialHoldings()
Get Consortial Holdings
public
getConsortialHoldings(string $id, array<string|int, mixed> $patron, array<string|int, mixed> $ids) : array<string|int, mixed>
This is responsible for retrieving the holding information of a certain consortial record.
Parameters
- $id : string
-
The record id to retrieve the holdings for
- $patron : array<string|int, mixed>
-
Patron data
- $ids : array<string|int, mixed>
-
The (consortial) source records for the record id
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.
getCourses()
Get Courses
public
getCourses() : array<string|int, mixed>
Obtain a list of courses for use in limiting the reserves list.
Return values
array<string|int, mixed> —An associative array with key = ID, value = name.
getDefaultLoginDriver()
Get default login driver
public
getDefaultLoginDriver() : string
Return values
string —Default login driver or empty string
getDefaultPickUpLocation()
Get Default Pick Up Location
public
getDefaultPickUpLocation([array<string|int, mixed> $patron = false ][, array<string|int, mixed> $holdDetails = null ]) : string
Returns the default pick up location
Parameters
- $patron : array<string|int, mixed> = false
-
Patron information returned by the patronLogin method.
- $holdDetails : array<string|int, mixed> = null
-
Optional array, only passed in when getting a list in the context of placing a hold; contains most of the same values passed to placeHold, minus the patron data. May be used to limit the pickup options or may be ignored.
Return values
string —A location ID
getDefaultRequestGroup()
Get Default Request Group
public
getDefaultRequestGroup(array<string|int, mixed> $patron[, array<string|int, mixed> $holdDetails = null ]) : string
Returns the default request group
Parameters
- $patron : array<string|int, mixed>
-
Patron information returned by the patronLogin method.
- $holdDetails : array<string|int, mixed> = null
-
Optional array, only passed in when getting a list in the context of placing a hold; contains most of the same values passed to placeHold, minus the patron data. May be used to limit the request group options or may be ignored.
Return values
string —A location ID
getDepartments()
Get Departments
public
getDepartments() : array<string|int, mixed>
Obtain a list of departments for use in limiting the reserves list.
Return values
array<string|int, mixed> —An associative array with key = dept. ID, value = dept. name.
getFunds()
Get Funds
public
getFunds() : array<string|int, mixed>
Return a list of funds which may be used to limit the getNewItems list.
Tags
Return values
array<string|int, mixed> —An associative array with key = fund ID, value = fund name.
getHoldDefaultRequiredDate()
Get Default "Hold Required By" Date (as Unix timestamp) or null if unsupported
public
getHoldDefaultRequiredDate(array<string|int, mixed> $patron, array<string|int, mixed> $holdInfo) : int|null
Parameters
- $patron : array<string|int, mixed>
-
Patron information returned by the patronLogin method.
- $holdInfo : array<string|int, mixed>
-
Contains most of the same values passed to placeHold, minus the patron data.
Return values
int|null —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.
getHoldLink()
Get Hold Link
public
getHoldLink(string $id, array<string|int, mixed> $details) : string
The goal for this method is to return a URL to a "place hold" web page on the ILS OPAC. This is used for ILSs that do not support an API or method to place Holds.
Parameters
- $id : string
-
The id of the bib record
- $details : array<string|int, mixed>
-
Item details from getHoldings return array
Return values
string —URL to ILS's OPAC's place hold screen.
getILLPickupLibraries()
Get ILL Pickup Libraries
public
getILLPickupLibraries(string $id, array<string|int, mixed> $patron) : bool|array<string|int, mixed>
This is responsible for getting information on the possible pickup libraries
Parameters
- $id : string
-
Record ID
- $patron : array<string|int, mixed>
-
Patron
Return values
bool|array<string|int, mixed> —False if request not allowed, or an array of associative arrays with libraries.
getILLPickupLocations()
Get ILL Pickup Locations
public
getILLPickupLocations(string $id, string $pickupLib, array<string|int, mixed> $patron) : bool|array<string|int, mixed>
This is responsible for getting a list of possible pickup locations for a library
Parameters
- $id : string
-
Record ID
- $pickupLib : string
-
Pickup library ID
- $patron : array<string|int, mixed>
-
Patron
Return values
bool|array<string|int, mixed> —False if request not allowed, or an array of locations.
getInstructors()
Get Instructors
public
getInstructors() : array<string|int, mixed>
Obtain a list of instructors for use in limiting the reserves list.
Return values
array<string|int, mixed> —An associative array with key = ID, value = name.
getLoginDrivers()
Get available login targets (drivers enabled for login)
public
getLoginDrivers() : array<string|int, string>
Return values
array<string|int, string> —Source ID's
getMyFines()
Get Patron Fines
public
getMyFines(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving all fines by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Return values
mixed —Array of the patron's fines on success.
getMyHolds()
Get Patron Holds
public
getMyHolds(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving all holds by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Return values
mixed —Array of the patron's holds
getMyILLRequests()
Get Patron ILL Requests
public
getMyILLRequests(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving all ILL Requests by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Return values
mixed —Array of the patron's ILL requests
getMyProfile()
Get Patron Profile
public
getMyProfile(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving the profile for a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array
Return values
mixed —Array of the patron's profile data
getMyStorageRetrievalRequests()
Get Patron Call Slips
public
getMyStorageRetrievalRequests(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving all call slips by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Return values
mixed —Array of the patron's holds
getMyTransactionHistory()
Get Patron Loan History
public
getMyTransactionHistory(array<string|int, mixed> $user[, array<string|int, mixed> $params = null ]) : array<string|int, mixed>
Parameters
- $user : array<string|int, mixed>
-
The patron array from patronLogin
- $params : array<string|int, mixed> = null
-
Parameters
Tags
Return values
array<string|int, mixed> —Array of the patron's historic loans on success.
getMyTransactions()
Get Patron Transactions
public
getMyTransactions(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving all transactions (i.e. checked out items) by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Return values
mixed —Array of the patron's transactions on success.
getNewItems()
Get New Items
public
getNewItems(int $page, int $limit, int $daysOld[, int $fundId = null ]) : array<string|int, mixed>
Retrieve the IDs of items recently added to the catalog.
Parameters
- $page : int
-
Page number of results to retrieve (counting starts at 1)
- $limit : int
-
The size of each page of results to retrieve
- $daysOld : int
-
The maximum age of records to retrieve in days (max. 30)
- $fundId : int = null
-
optional fund ID to use for limiting results (use a value returned by getFunds, or exclude for no limit); note that "fund" may be a misnomer - if funds are not an appropriate way to limit your new item results, you can return a different set of values from getFunds. The important thing is that this parameter supports an ID returned by getFunds, whatever that may mean.
Return values
array<string|int, mixed> —Associative array with 'count' and 'results' keys
getOfflineMode()
Get Offline Mode
public
getOfflineMode() : string
This is responsible for returning the offline mode
Return values
string —"ils-offline" for systems where the main ILS is offline, "ils-none" for systems which do not use an ILS
getPickUpLocations()
Get Pick Up Locations
public
getPickUpLocations([array<string|int, mixed> $patron = false ][, array<string|int, mixed> $holdDetails = null ]) : array<string|int, mixed>
This is responsible get a list of valid library locations for holds / recall retrieval
Parameters
- $patron : array<string|int, mixed> = false
-
Patron information returned by the patronLogin method.
- $holdDetails : array<string|int, mixed> = null
-
Optional array, only passed in when getting a list in the context of placing or editing a hold. When placing a hold, it contains most of the same values passed to placeHold, minus the patron data. When editing a hold it contains all the hold information returned by getMyHolds. May be used to limit the pickup options or may be ignored. The driver must not add new options to the return array based on this data or other areas of VuFind may behave incorrectly.
Return values
array<string|int, mixed> —An array of associative arrays with locationID and locationDisplay keys
getProxiedUsers()
Get list of users for whom the provided patron is a proxy.
public
getProxiedUsers(array<string|int, mixed> $patron) : array<string|int, mixed>
Parameters
- $patron : array<string|int, mixed>
-
The patron array with username and password
Return values
array<string|int, mixed> —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.
getRenewDetails()
Get Renew Details
public
getRenewDetails(array<string|int, mixed> $checkoutDetails) : string
In order to renew an item, the ILS requires information on the item and patron. This function returns the information as a string which is then used as submitted form data in checkedOut.php. This value is then extracted by the RenewMyItems function.
Parameters
- $checkoutDetails : array<string|int, mixed>
-
An array of item data
Return values
string —Data for use in a form field
getRequestBlocks()
Check whether the patron is blocked from placing requests (holds/ILL/SRR).
public
getRequestBlocks(array<string|int, mixed> $patron) : mixed
Parameters
- $patron : array<string|int, mixed>
-
Patron data from patronLogin().
Return values
mixed —A boolean false if no blocks are in place and an array of block reasons if blocks are in place
getRequestGroups()
Get request groups
public
getRequestGroups(int $id, array<string|int, mixed> $patron[, array<string|int, mixed> $holdDetails = null ]) : array<string|int, mixed>
Parameters
- $id : int
-
BIB ID
- $patron : array<string|int, mixed>
-
Patron information returned by the patronLogin method.
- $holdDetails : array<string|int, mixed> = null
-
Optional array, only passed in when getting a list in the context of placing a hold; contains most of the same values passed to placeHold, minus the patron data. May be used to limit the request group options or may be ignored.
Return values
array<string|int, mixed> —An array of associative arrays with requestGroupId and name keys
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.
getSuppressedAuthorityRecords()
Get suppressed authority records
public
getSuppressedAuthorityRecords() : array<string|int, mixed>
Return values
array<string|int, mixed> —ID numbers of suppressed authority records in the system.
getSuppressedRecords()
Get suppressed records.
public
getSuppressedRecords() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —ID numbers of suppressed records in the system.
getUrlsForRecord()
Provide an array of URL data (in the same format returned by the record driver's getURLs method) for the specified bibliographic record.
public
getUrlsForRecord(string $id) : array<string|int, mixed>
Parameters
- $id : string
-
Bibliographic record ID
Return values
array<string|int, mixed> —hasHoldings()
Has Holdings
public
hasHoldings(string $id) : bool
This is responsible for determining if holdings exist for a particular bibliographic id
Parameters
- $id : string
-
The record id to retrieve the holdings for
Tags
Return values
bool —True if holdings exist, False if they do not
init()
Initialize the driver.
public
init() : void
Validate configuration and perform all resource-intensive tasks needed to make the driver active.
Tags
Return values
void —loginIsHidden()
Get Hidden Login Mode
public
loginIsHidden() : bool
This is responsible for indicating whether login should be hidden.
Return values
bool —true if the login should be hidden, false if not
patronLogin()
Patron Login
public
patronLogin(string $username, string $password) : mixed
This is responsible for authenticating a patron against the catalog.
Parameters
- $username : string
-
The patron barcode
- $password : string
-
The patron password
Tags
Return values
mixed —Associative array of patron info on successful login, null on unsuccessful login.
placeHold()
Place Hold
public
placeHold(array<string|int, mixed> $holdDetails) : mixed
Attempts to place a hold or recall on a particular item and returns an array with result details
Parameters
- $holdDetails : array<string|int, mixed>
-
An array of item and patron data
Return values
mixed —An array of data on the request including whether or not it was successful and a system message (if available)
placeILLRequest()
Place ILL Request
public
placeILLRequest(array<string|int, mixed> $details) : mixed
Attempts to place an ILL request on a particular item and returns an array with result details (or throws an exception on failure of support classes)
Parameters
- $details : array<string|int, mixed>
-
An array of item and patron data
Return values
mixed —An array of data on the request including whether or not it was successful and a system message (if available)
placeStorageRetrievalRequest()
Place Storage Retrieval Request
public
placeStorageRetrievalRequest(array<string|int, mixed> $details) : mixed
Attempts to place a storage retrieval request on a particular item and returns an array with result details
Parameters
- $details : array<string|int, mixed>
-
An array of item and patron data
Return values
mixed —An array of data on the request including whether or not it was successful and a system message (if available)
purgeTransactionHistory()
Purge Patron Transaction History
public
purgeTransactionHistory(array<string|int, mixed> $patron, array<string|int, mixed>|null $ids) : array<string|int, mixed>
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
- $ids : array<string|int, mixed>|null
-
IDs to purge, or null for all
Tags
Return values
array<string|int, mixed> —Associative array of the results
renewMyItems()
Renew My Items
public
renewMyItems(array<string|int, mixed> $renewDetails) : array<string|int, mixed>
Function for attempting to renew a patron's items. The data in $renewDetails['details'] is determined by getRenewDetails().
Parameters
- $renewDetails : array<string|int, mixed>
-
An array of data required for renewing items including the Patron ID and an array of renewal IDS
Return values
array<string|int, mixed> —An array of renewal information keyed by item ID
renewMyItemsLink()
Renew My Items Link
public
renewMyItemsLink(array<string|int, mixed> $checkedOutDetails) : string
Parameters
- $checkedOutDetails : array<string|int, mixed>
-
Checked Out Details
Return values
string —Url to a native OPAC
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 —supportsMethod()
Helper method to determine whether or not a certain method can be called on this driver. Required method for any smart drivers.
public
supportsMethod(string $method, array<string|int, mixed> $params) : bool
Parameters
- $method : string
-
The name of the called method.
- $params : array<string|int, mixed>
-
Array of passed parameters.
Return values
bool —True if the method can be called with the given parameters, false otherwise.
updateHolds()
Update holds
public
updateHolds(array<string|int, mixed> $holdsDetails, array<string|int, mixed> $fields, array<string|int, mixed> $patron) : array<string|int, mixed>
This is responsible for changing the status of hold requests
Parameters
- $holdsDetails : array<string|int, mixed>
-
The details identifying the holds
- $fields : array<string|int, mixed>
-
An associative array of fields to be updated
- $patron : array<string|int, mixed>
-
Patron array
Return values
array<string|int, mixed> —Associative array of the results
callDriverMethod()
Calling a function of a driver
protected
callDriverMethod(string $driverName, string $method, array<string|int, mixed> $params) : mixed
Parameters
- $driverName : string
-
Name of the driver on which the method is called
- $method : string
-
Name of the method
- $params : array<string|int, mixed>
-
Parameters
Return values
mixed —combineArraysOfAssociativeArrays()
Used for methods where the result is a list of items. Calls the method for the main driver and all support drivers. Then adds specified fields of the support drivers to the main driver's result.
protected
combineArraysOfAssociativeArrays( $methodName, $params[, $optionalResultSubfields = [] ]) : mixed
Parameters
- $methodName :
-
string Name of the method to be called
- $params :
-
array Arguments for the method call
- $optionalResultSubfields : = []
-
array Keys of possible result subfields
Return values
mixed —combineMultipleArraysOfAssociativeArrays()
Used for methods where the result is a list of lists of items. Calls the method for the main driver and all support drivers. Then adds specified fields of the support drivers to the main driver's result.
protected
combineMultipleArraysOfAssociativeArrays( $methodName, $params, $baseMergeKey[, $optionalResultSubfields = [] ]) : mixed
Parameters
- $methodName :
-
string Name of the method to be called
- $params :
-
array Arguments for the method
- $baseMergeKey :
-
string Key to match arrays on the first level
- $optionalResultSubfields : = []
-
array Keys of possible result subfields
Return values
mixed —createDriver()
Create a driver with the given name.
protected
createDriver(string $name) : mixed
Parameters
- $name : string
-
Name of the driver.
Return values
mixed —On success a driver object, otherwise null.
debug()
Log a debug message.
protected
debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —defaultCall()
Simply calls the method for the specified main driver
protected
defaultCall(string $methodName, array<string|int, mixed> $params) : mixed
Parameters
- $methodName : string
-
Name of the method to be called
- $params : array<string|int, mixed>
-
Arguments for the method call
Return values
mixed —driverSupportsMethod()
Check whether the given driver supports the given method
protected
driverSupportsMethod(object $driver, string $method[, array<string|int, mixed> $params = null ]) : bool
Parameters
- $driver : object
-
ILS Driver
- $method : string
-
Method name
- $params : array<string|int, mixed> = null
-
Array of passed parameters
Return values
bool —extractKey()
Takes an array of item as input and creates an associative array using specified fields of the items as key
protected
extractKey(array<string|int, mixed> $data, string $key) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
Array of items
- $key : string
-
Items field to be used as key
Return values
array<string|int, mixed> —extractResultSubfields()
Extracts results from support drivers where the result can be split into named subfields.
protected
extractResultSubfields( $result, $optionalResultSubfields) : array<string|int, mixed>
Parameters
- $result :
-
array Result of a support driver
- $optionalResultSubfields :
-
array Keys of possible result subfields
Return values
array<string|int, mixed> —getDriver()
Find the correct driver for the correct configuration file with the given name and cache an initialized copy of it.
protected
getDriver(string $name) : mixed
Parameters
- $name : string
-
The name of the driver to get.
Return values
mixed —On success a driver object, otherwise null.
getDriverConfig()
Get configuration for the ILS driver. We will load an .ini file named after the driver class and number if it exists; otherwise we will return an empty array.
protected
getDriverConfig(string $name) : array<string|int, mixed>
Parameters
- $name : string
-
The $name to use for determining the configuration file
Return values
array<string|int, mixed> —The configuration of the driver
getMainDriverNameForMethod()
Determines which driver should be used for the specified method
protected
getMainDriverNameForMethod( $method) : string
Parameters
Return values
string —log()
Send a message to the logger.
protected
log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
- $level : string
-
Log level
- $message : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = false
-
Prepend class name to message?
Return values
void —logError()
Log an error message.
protected
logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —logWarning()
Log a warning message.
protected
logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —mergeAssociativeArrays()
Merges results of the main and the support drivers on the specified key
protected
mergeAssociativeArrays(array<string|int, mixed> $mainResult, array<string|int, mixed> $supportResults, array<string|int, mixed> $mergeKeys) : array<string|int, mixed>
Parameters
- $mainResult : array<string|int, mixed>
-
Result of main driver
- $supportResults : array<string|int, mixed>
-
Results of support drivers
- $mergeKeys : array<string|int, mixed>
-
Key on which the results are merged
Return values
array<string|int, mixed> —mergeInSubfields()
Merges results where the result can be split into named subfields.
protected
mergeInSubfields( $mainResult, $supportResults, $mergeKeys, $optionalResultSubfields) : array<string|int, mixed>
Parameters
- $mainResult :
-
array Result of the main driver
- $supportResults :
-
array Result of a support driver
- $mergeKeys :
-
array Merge keys
- $optionalResultSubfields :
-
array Keys of possible result subfields
Return values
array<string|int, mixed> —mergeSingleArrayResults()
Used for methods that return associative arrays. Calls the method for the main and support drivers and merges the results. Only uses the specified support fields of the support drivers.
protected
mergeSingleArrayResults(string $methodName, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $methodName : string
-
Name of the method to be called
- $params : array<string|int, mixed>
-
Arguments for the method call
Return values
array<string|int, mixed> —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)