VoyagerRestful
extends Voyager
in package
implements
HttpServiceAwareInterface, HasSorterInterface
Uses
CacheTrait, HttpServiceAwareTrait, HasSorterTrait
Voyager Restful ILS Driver
Tags
Interfaces, Classes, Traits and Enums
- HttpServiceAwareInterface
- HasSorterInterface
- Interface SortingInterface
Table of Contents
- $allowCancelingAvailableRequests : bool
- Whether it is allowed to cancel a request for an item that is available for pickup
- $cache : StorageInterface
- Cache for storing data temporarily (e.g. patron blocks with the ILS driver)
- $cacheLifetime : int
- Lifetime of cache (in seconds).
- $callSlipCheckLimit : int
- The maximum number of call slips to check at a time (0 = no limit)
- $checkItemsExist : bool
- Whether to check that items exist when placing a hold or recall request
- $checkItemsNotAvailable : bool
- Whether to check that items are not available when placing a hold or recall request
- $checkLoans : bool
- Whether to check that the user doesn't already have the record on loan when placing a hold or recall request
- $config : array<string|int, mixed>
- Driver configuration
- $cookies : array<string|int, SetCookie>
- Web Services cookies. Required for at least renewals (for JSESSIONID) as documented at http://www.exlibrisgroup.org/display/VoyagerOI/Renew
- $dateFormat : Converter
- Date formatting object
- $dbName : string
- Name of database
- $defaultPickUpLocation : string
- Default pickup location
- $defaultRequestGroup : bool|string
- Default request group
- $displayDueTimeIntervals : array<string|int, mixed>
- Loan interval types for which to display the due time (empty = all)
- $excludedItemLocations : string
- Item locations excluded from item availability check.
- $holdCheckLimit : int
- The maximum number of holds to check at a time (0 = no limit)
- $holdsMode : string
- Holds mode
- $itemHoldsEnabled : bool
- Whether item holds are enabled
- $lazyDb : Oci8
- Lazily instantiated database connection. Use getDb() to access it.
- $pickupLocationsInRequestGroup : bool
- Whether pickup location must belong to the request group
- $recallsEnabled : bool
- Whether recalls are enabled
- $requestGroupsEnabled : bool
- Whether request groups are enabled
- $sorter : SorterInterface|null
- Sorter
- $statusRankings : array<string|int, mixed>|bool
- Stored status rankings from the database; initialized to false but populated by the pickStatus() method.
- $titleHoldsMode : string
- Title-level holds mode
- $translator : TranslatorInterface
- Translator
- $useHoldingsSortGroups : bool
- Whether to use holdings sort groups to sort holdings records
- $ws_app : string
- Web services app
- $ws_dbKey : string
- Web services database key
- $ws_host : string
- Web services host
- $ws_patronHomeUbId : string
- Web services patron home UB ID
- $ws_pickUpLocations : array<string|int, mixed>
- Legal pickup locations
- $ws_port : string
- Web services port
- __construct() : mixed
- Constructor
- cancelHolds() : array<string|int, mixed>
- Cancel Holds
- cancelILLRequests() : array<string|int, mixed>
- Cancel ILL (UB) Requests
- cancelStorageRetrievalRequests() : array<string|int, mixed>
- Cancel Storage Retrieval Requests (Call Slips)
- changePassword() : array<string|int, mixed>
- Change Password
- checkILLRequestIsValid() : bool
- Check if ILL Request is valid
- checkRequestIsValid() : bool
- Check if request is valid
- checkStorageRetrievalRequestIsValid() : bool
- Check if storage retrieval request is valid
- findReserves() : array<string|int, mixed>
- Find Reserves
- getAccountBlocks() : mixed
- Check whether the patron has any blocks on their account.
- getCancelHoldDetails() : string
- Get Cancel Hold Details
- getCancelILLRequestDetails() : string
- Get Cancel ILL (UB) Request Details
- getCancelStorageRetrievalRequestDetails() : string
- Get Cancel Storage Retrieval Request (Call Slip) Details
- getConfig() : array<string|int, mixed>
- Public Function which retrieves renew, hold and cancel settings from the driver ini file.
- getCourses() : array<string|int, mixed>
- Get Courses
- getDefaultPickUpLocation() : false|string
- Get Default Pick Up Location
- getDefaultRequestGroup() : false|string
- Get Default Request Group
- getDepartments() : array<string|int, mixed>
- Get Departments
- getFunds() : array<string|int, mixed>
- Get Funds
- getHolding() : array<string|int, mixed>
- Get Holding
- getHoldLink() : string
- Get Hold Link
- getILLPickupLibraries() : bool|array<string|int, mixed>
- Get ILL (UB) Pickup Libraries
- getILLPickupLocations() : bool|array<string|int, mixed>
- Get ILL (UB) Pickup Locations
- getInstructors() : array<string|int, mixed>
- Get Instructors
- getMyFines() : mixed
- Get Patron Fines
- getMyHolds() : array<string|int, mixed>
- Get Patron Holds
- getMyILLRequests() : mixed
- Get Patron ILL Requests
- getMyProfile() : array<string|int, mixed>
- Get Patron Profile
- getMyStorageRetrievalRequests() : array<string|int, mixed>
- Get Patron Storage Retrieval Requests
- getMyTransactions() : mixed
- Get Patron Transactions
- getNewItems() : array<string|int, mixed>
- Get New Items
- getPickUpLocations() : array<string|int, mixed>
- Get Pick Up Locations
- getPurchaseHistory() : array<string|int, mixed>
- Get Purchase History
- getRecentlyReturnedBibs() : array<string|int, mixed>
- Get bib records for recently returned items.
- 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
- getSorter() : SorterInterface
- Get the sorter
- getStatus() : mixed
- Get Status
- getStatuses() : array<string|int, mixed>
- Get Statuses
- getSuppressedRecords() : array<string|int, mixed>
- Get suppressed records.
- getTranslator() : TranslatorInterface
- Get translator object.
- getTranslatorLocale() : string
- Get the locale from the translator.
- getTrendingBibs() : array<string|int, mixed>
- Get bib records for "trending" items (recently returned with high usage).
- init() : void
- Initialize the driver.
- patronLogin() : mixed
- Patron Login
- placeHold() : mixed
- Place Hold
- placeILLRequest() : mixed
- Place ILL (UB) Request
- placeStorageRetrievalRequest() : mixed
- Place Storage Retrieval Request (Call Slip)
- renewMyItems() : array<string|int, mixed>
- Renew My Items
- setCacheStorage() : void
- Set a cache storage object.
- setConfig() : void
- Set configuration.
- setSorter() : void
- Set the sorter
- setTranslator() : TranslatorAwareInterface
- Set a translator
- supportsMethod() : bool
- Helper method to determine whether or not a certain method can be called on this driver. Required method for any smart drivers.
- translate() : string
- Translate a string (or string-castable object)
- translateWithPrefix() : string
- Translate a string (or string-castable object) using a prefix, or without the prefix if a prefixed translation is not found.
- buildBasicXML() : string
- Build Basic XML
- buildSqlFromArray() : array<string|int, mixed>
- Protected support method for building sql strings.
- checkAccountBlocks() : mixed
- Check Account Blocks
- checkItemRequests() : bool
- Check Item Requests
- debug() : void
- Log a debug message.
- debugSQL() : void
- Log an SQL statement debug message.
- determineAvailability() : array<string|int, mixed>
- Protected support method to take an array of status strings and determine whether or not this indicates an available item. Returns an array with two keys: 'available', the boolean availability status, and 'otherStatuses', every status code found other than "Not Charged" - for use with pickStatus().
- determineHoldType() : string
- Determine Hold Type
- encodeXML() : string
- Encode a string for XML
- executeSQL() : PDOStatement
- Execute an SQL query
- extractBlockReasons() : array<string|int, mixed>
- Given the appropriate portion of the blocks API response, extract a list of block reasons that VuFind is not configured to ignore.
- extractTextDomain() : array<string|int, mixed>
- Given a translation string with or without a text domain, return an array with the raw string and the text domain separated.
- getCachedData() : mixed|null
- Helper function for fetching cached data.
- getCacheKey() : string
- Add instance-specific context to a cache key suffix (to ensure that multiple drivers don't accidentally share values in the cache.
- getCallSlips() : mixed
- Get Patron Storage Retrieval Requests (Call Slips). Gets callslips via the API. Returns only remote slips by default since more complete data can be retrieved directly from the local database; however, the $local parameter exists to support potential local customizations.
- getDb() : PDO
- Initialize database connection if necessary and return it.
- getDebugTranslation() : string
- Build a debug-mode translation
- getFineSQL() : array<string|int, mixed>
- Protected support method for getMyFines.
- getHoldingData() : array<string|int, mixed>
- Protected support method for getHolding.
- getHoldingItemsSQL() : array<string|int, mixed>
- Protected support method for getHolding.
- getHoldingNoItemsSQL() : array<string|int, mixed>
- Protected support method for getHolding.
- getHoldsFromApi() : array<string|int, mixed>
- Get patron's local or remote holds from the API
- getItemSortSequenceSQL() : string
- Helper function that returns SQL for getting a sort sequence for a location
- getLocationName() : string
- Look up a location name by ID.
- getMFHDData() : string|array<string|int, mixed>
- Get specified fields from an MFHD MARC Record
- getMyHoldsSQL() : array<string|int, mixed>
- Protected support method for getMyHolds.
- getMyStorageRetrievalRequestsSQL() : array<string|int, mixed>
- Protected support method for getMyStorageRetrievalRequests.
- getMyTransactionsSQL() : array<string|int, mixed>
- Protected support method for getMyTransactions.
- getPurchaseHistoryData() : array<string|int, mixed>
- Get Purchase History Data
- getStatusData() : array<string|int, mixed>
- Protected support method for getStatus -- process rows returned by SQL lookup.
- getStatusNoItemsSQL() : array<string|int, mixed>
- Protected support method for getStatus -- get components for status lookup SQL to use when a bib record has no items.
- getStatusRanking() : int
- Support method for pickStatus() -- get the ranking value of the specified status message.
- getStatusSQL() : array<string|int, mixed>
- Protected support method for getStatus -- get components required for standard status lookup SQL.
- getUBRequestDetails() : bool|array<string|int, mixed>
- A helper function that retrieves UB request details for ILL and caches them for a short while for faster access.
- holdError() : array<string|int, mixed>
- Hold Error
- isBorrowable() : bool
- Support method for VuFind Hold Logic. Takes an item type id and determines whether or not an item is borrowable based on the non_borrowable settings in configuration file
- isHoldable() : bool
- Support method for VuFind Hold Logic. Take an array of status strings and determines whether or not an item is holdable based on the valid_hold_statuses settings in configuration file
- isILLRequestAllowed() : bool
- Support method for VuFind ILL Logic. Take a holdings row array and determine whether or not an ILL (UB) request is allowed.
- isLocalInst() : bool
- Support method: is this institution code a local one?
- isRecordOnLoan() : bool
- Check whether the given patron has the given bib record or its item on loan.
- isStorageRetrievalRequestAllowed() : bool
- Support method for VuFind Storage Retrieval Request (Call Slip) Logic.
- itemsAvailable() : bool
- Check whether there are items available for loan for the given BIB ID
- itemsExist() : bool
- Check whether items exist for the given BIB ID
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
- makeItemRequests() : array<string|int, mixed>
- Make Item Requests
- makeRequest() : obj
- Make Request
- pickStatus() : string
- Protected support method to pick which status message to display when multiple options are present.
- pickTransactionStatus() : string|bool
- Pick a transaction status worth displaying to the user (or return false if nothing important is found).
- pickUpLocationIsValid() : bool
- Is the selected pickup location valid for the hold?
- processFinesData() : array<string|int, mixed>
- Protected support method for getMyFines.
- processHoldingData() : array<string|int, mixed>
- Protected support method for getHolding.
- processHoldingDueDate() : string|bool
- Support method for processHoldingData: format a due date for inclusion in holdings data.
- processHoldingReturnDate() : string|bool
- Support method for processHoldingData: format a return date for inclusion in holdings data.
- processHoldingRow() : array<string|int, mixed>
- Protected support method for getHolding.
- processHoldsList() : mixed
- Process Holds List
- processMyHoldsData() : array<string|int, mixed>
- Protected support method for getMyHolds.
- processMyStorageRetrievalRequestsData() : array<string|int, mixed>
- Protected support method for getMyStorageRetrievalRequests.
- processMyTransactionsData() : array<string|int, mixed>
- Protected support method for getMyTransactions.
- processRecordSegment() : array<string|int, mixed>
- Protected support method for getHolding.
- processStatusData() : array<string|int, mixed>
- Protected support method for getStatus -- process all details collected by getStatusData().
- putCachedData() : void
- Helper function for storing cached data.
- removeCachedData() : void
- Helper function for removing cached data.
- requestGroupSortFunction() : number
- Sort function for sorting request groups
- sanitizePIN() : string
- Sanitize patron PIN code (remove characters Voyager doesn't handle properly)
- sanitizeTranslationKey() : string
- Make sure there are not any illegal characters in the translation key that might prevent successful lookup in language files.
- throwAsIlsException() : never
- Rethrow the provided exception as an ILS exception.
- translateString() : string
- Get translation for a string
- utf8Encode() : string
- Convert string from ISO 8859-1 into UTF-8
Properties
$allowCancelingAvailableRequests
Whether it is allowed to cancel a request for an item that is available for pickup
protected
bool
$allowCancelingAvailableRequests
$cache
Cache for storing data temporarily (e.g. patron blocks with the ILS driver)
protected
StorageInterface
$cache
= null
$cacheLifetime
Lifetime of cache (in seconds).
protected
int
$cacheLifetime
= 30
$callSlipCheckLimit
The maximum number of call slips to check at a time (0 = no limit)
protected
int
$callSlipCheckLimit
$checkItemsExist
Whether to check that items exist when placing a hold or recall request
protected
bool
$checkItemsExist
$checkItemsNotAvailable
Whether to check that items are not available when placing a hold or recall request
protected
bool
$checkItemsNotAvailable
$checkLoans
Whether to check that the user doesn't already have the record on loan when placing a hold or recall request
protected
bool
$checkLoans
$config
Driver configuration
protected
array<string|int, mixed>
$config
= []
$cookies
Web Services cookies. Required for at least renewals (for JSESSIONID) as documented at http://www.exlibrisgroup.org/display/VoyagerOI/Renew
protected
array<string|int, SetCookie>
$cookies
= false
$dateFormat
Date formatting object
protected
Converter
$dateFormat
$dbName
Name of database
protected
string
$dbName
$defaultPickUpLocation
Default pickup location
protected
string
$defaultPickUpLocation
$defaultRequestGroup
Default request group
protected
bool|string
$defaultRequestGroup
$displayDueTimeIntervals
Loan interval types for which to display the due time (empty = all)
protected
array<string|int, mixed>
$displayDueTimeIntervals
$excludedItemLocations
Item locations excluded from item availability check.
protected
string
$excludedItemLocations
$holdCheckLimit
The maximum number of holds to check at a time (0 = no limit)
protected
int
$holdCheckLimit
$holdsMode
Holds mode
protected
string
$holdsMode
$itemHoldsEnabled
Whether item holds are enabled
protected
bool
$itemHoldsEnabled
$lazyDb
Lazily instantiated database connection. Use getDb() to access it.
protected
Oci8
$lazyDb
$pickupLocationsInRequestGroup
Whether pickup location must belong to the request group
protected
bool
$pickupLocationsInRequestGroup
$recallsEnabled
Whether recalls are enabled
protected
bool
$recallsEnabled
$requestGroupsEnabled
Whether request groups are enabled
protected
bool
$requestGroupsEnabled
$sorter
Sorter
protected
SorterInterface|null
$sorter
= null
$statusRankings
Stored status rankings from the database; initialized to false but populated by the pickStatus() method.
protected
array<string|int, mixed>|bool
$statusRankings
= false
$titleHoldsMode
Title-level holds mode
protected
string
$titleHoldsMode
$translator
Translator
protected
TranslatorInterface
$translator
= null
$useHoldingsSortGroups
Whether to use holdings sort groups to sort holdings records
protected
bool
$useHoldingsSortGroups
$ws_app
Web services app
protected
string
$ws_app
$ws_dbKey
Web services database key
protected
string
$ws_dbKey
$ws_host
Web services host
protected
string
$ws_host
$ws_patronHomeUbId
Web services patron home UB ID
protected
string
$ws_patronHomeUbId
$ws_pickUpLocations
Legal pickup locations
protected
array<string|int, mixed>
$ws_pickUpLocations
$ws_port
Web services port
protected
string
$ws_port
Methods
__construct()
Constructor
public
__construct(Converter $dateConverter[, string $holdsMode = 'disabled' ][, string $titleHoldsMode = 'disabled' ]) : mixed
Parameters
- $dateConverter : Converter
-
Date converter object
- $holdsMode : string = 'disabled'
-
Holds mode setting
- $titleHoldsMode : string = 'disabled'
-
Title holds mode setting
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 (UB) Requests
public
cancelILLRequests(array<string|int, mixed> $cancelDetails) : array<string|int, mixed>
Attempts to Cancel an UB 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 Storage Retrieval Requests (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) : array<string|int, mixed>
Attempts to change patron password (PIN code)
Parameters
- $details : array<string|int, mixed>
-
An array of patron id and old and new password:
'patron' The patron array from patronLogin 'oldPassword' Old password 'newPassword' New password
Return values
array<string|int, mixed> —An array of data on the request including whether or not it was successful and a system message (if available)
checkILLRequestIsValid()
Check if ILL Request is valid
public
checkILLRequestIsValid(string $id, array<string|int, mixed> $data, array<string|int, mixed> $patron) : bool
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
bool —True if request is valid, false if not
checkRequestIsValid()
Check if request is valid
public
checkRequestIsValid(string $id, array<string|int, mixed> $data, array<string|int, mixed> $patron) : bool
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
bool —True if request is valid, false if not
checkStorageRetrievalRequestIsValid()
Check if storage retrieval request is valid
public
checkStorageRetrievalRequestIsValid(string $id, array<string|int, mixed> $data, array<string|int, mixed> $patron) : bool
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
bool —True if request is valid, false if not
findReserves()
Find Reserves
public
findReserves(string $course, string $inst, string $dept) : array<string|int, mixed>
Obtain information on course reserves.
This version of findReserves was contributed by Matthew Hooper and includes support for electronic reserves (though eReserve support is still a work in progress).
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)
Tags
Return values
array<string|int, 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> $holdDetails[, array<string|int, mixed> $patron = [] ]) : string
In order to cancel a hold, Voyager requires the patron details an item ID and a recall ID. This function returns the item id and recall id as a string separated by a pipe, which is then submitted as form data in Hold.php. This value is then extracted by the CancelHolds function.
Parameters
- $holdDetails : array<string|int, mixed>
-
A single hold array from getMyHolds
- $patron : array<string|int, mixed> = []
-
Patron information from patronLogin
Tags
Return values
string —Data for use in a form field
getCancelILLRequestDetails()
Get Cancel ILL (UB) Request Details
public
getCancelILLRequestDetails(array<string|int, mixed> $details, array<string|int, mixed> $patron) : string
In Voyager an UB request is either a call slip (pending delivery) or a hold (pending checkout). In order to cancel an UB request, Voyager requires the patron details, an item ID, request type and a recall ID. This function returns the information as a string separated by pipes, which is then submitted as form data and extracted by the CancelILLRequests function.
Parameters
- $details : array<string|int, mixed>
-
An array of item data
- $patron : array<string|int, mixed>
-
Patron information from patronLogin
Tags
Return values
string —Data for use in a form field
getCancelStorageRetrievalRequestDetails()
Get Cancel Storage Retrieval Request (Call Slip) Details
public
getCancelStorageRetrievalRequestDetails(array<string|int, mixed> $details, array<string|int, mixed> $patron) : string
In order to cancel a call slip, Voyager requires the item ID and a request ID. This function returns the item id and call slip id as a string separated by a pipe, 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
- $patron : array<string|int, mixed>
-
Patron information from patronLogin
Tags
Return values
string —Data for use in a form field
getConfig()
Public Function which retrieves renew, hold and cancel settings from the driver ini file.
public
getConfig(string $function[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $function : string
-
The name of the feature to be checked
- $params : array<string|int, mixed> = []
-
Optional feature-specific parameters (array)
Tags
Return values
array<string|int, mixed> —An array with key-value pairs.
getCourses()
Get Courses
public
getCourses() : array<string|int, mixed>
Obtain a list of courses for use in limiting the reserves list.
Tags
Return values
array<string|int, mixed> —An associative array with key = ID, value = name.
getDefaultPickUpLocation()
Get Default Pick Up Location
public
getDefaultPickUpLocation([array<string|int, mixed> $patron = false ][, array<string|int, mixed> $holdDetails = null ]) : false|string
Returns the default pick up location set in VoyagerRestful.ini
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.
Tags
Return values
false|string —The default pickup location for the patron or false if the user has to choose.
getDefaultRequestGroup()
Get Default Request Group
public
getDefaultRequestGroup([array<string|int, mixed> $patron = false ][, array<string|int, mixed> $holdDetails = null ]) : false|string
Returns the default request group set in VoyagerRestful.ini
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 request group options or may be ignored.
Tags
Return values
false|string —The default request group for the patron or false if the user has to choose.
getDepartments()
Get Departments
public
getDepartments() : array<string|int, mixed>
Obtain a list of departments for use in limiting the reserves list.
Tags
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.
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 $recordId, 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
- $recordId : string
-
The id of the bib record
- $details : array<string|int, mixed>
-
Item details from getHoldings return array
Tags
Return values
string —URL to ILS's OPAC's place hold screen.
getILLPickupLibraries()
Get ILL (UB) 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 (UB) 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
Tags
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.
Tags
Return values
array<string|int, mixed> —An associative array with key = ID, value = name.
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
Tags
Return values
mixed —Array of the patron's fines on success.
getMyHolds()
Get Patron Holds
public
getMyHolds(array<string|int, mixed> $patron) : array<string|int, mixed>
This is responsible for retrieving all holds by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Tags
Return values
array<string|int, mixed> —Array of the patron's holds on success.
getMyILLRequests()
Get Patron ILL Requests
public
getMyILLRequests(array<string|int, mixed> $patron) : mixed
This is responsible for retrieving all UB requests by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
Tags
Return values
mixed —Array of the patron's holds on success.
getMyProfile()
Get Patron Profile
public
getMyProfile(array<string|int, mixed> $patron) : array<string|int, mixed>
This is responsible for retrieving the profile for a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array
Tags
Return values
array<string|int, mixed> —Array of the patron's profile data on success.
getMyStorageRetrievalRequests()
Get Patron Storage Retrieval Requests
public
getMyStorageRetrievalRequests(array<string|int, mixed> $patron) : array<string|int, 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
array<string|int, mixed> —Array of the patron's storage retrieval requests.
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
Tags
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.
Tags
Return values
array<string|int, mixed> —Associative array with 'count' and 'results' keys
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 for getting 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.
Tags
Return values
array<string|int, mixed> —An array of associative arrays with locationID and locationDisplay keys
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.
getRecentlyReturnedBibs()
Get bib records for recently returned items.
public
getRecentlyReturnedBibs([int $limit = 30 ][, int $maxage = 30 ][, array<string|int, mixed> $patron = null ]) : array<string|int, mixed>
Parameters
- $limit : int = 30
-
Maximum number of records to retrieve (default = 30)
- $maxage : int = 30
-
The maximum number of days to consider "recently returned."
- $patron : array<string|int, mixed> = null
-
Patron Data
Tags
Return values
array<string|int, mixed> —getRenewDetails()
Get Renew Details
public
getRenewDetails(array<string|int, mixed> $checkOutDetails) : string
In order to renew an item, Voyager requires the patron details and an item id. This function returns the item id 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 $bibId, array<string|int, mixed> $patron[, array<string|int, mixed> $holdDetails = null ]) : array<string|int, mixed>
Parameters
- $bibId : 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.
Tags
Return values
array<string|int, mixed> —False if request groups not in use or an array of associative arrays with id and name keys
getSorter()
Get the sorter
public
getSorter() : SorterInterface
Return values
SorterInterface —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> $idList) : array<string|int, mixed>
This is responsible for retrieving the status information for a collection of records.
Parameters
- $idList : 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.
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.
getTranslator()
Get translator object.
public
getTranslator() : TranslatorInterface
Return values
TranslatorInterface —getTranslatorLocale()
Get the locale from the translator.
public
getTranslatorLocale([string $default = 'en' ]) : string
Parameters
- $default : string = 'en'
-
Default to use if translator absent.
Return values
string —getTrendingBibs()
Get bib records for "trending" items (recently returned with high usage).
public
getTrendingBibs([int $limit = 30 ][, int $maxage = 30 ][, array<string|int, mixed> $patron = null ]) : array<string|int, mixed>
Parameters
- $limit : int = 30
-
Maximum number of records to retrieve (default = 30)
- $maxage : int = 30
-
The maximum number of days' worth of data to examine.
- $patron : array<string|int, mixed> = null
-
Patron Data
Tags
Return values
array<string|int, mixed> —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 —patronLogin()
Patron Login
public
patronLogin(string $username, string $login) : mixed
This is responsible for authenticating a patron against the catalog.
Parameters
- $username : string
-
The patron barcode or institution ID (depending on config)
- $login : string
-
The patron's last name or PIN (depending on config)
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 or throws an exception on failure of support classes
Parameters
- $holdDetails : array<string|int, mixed>
-
An array of item and patron data
Tags
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 (UB) Request
public
placeILLRequest(array<string|int, mixed> $details) : mixed
Attempts to place an UB request on a particular item and returns an array with result details or a PEAR error 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 (Call Slip)
public
placeStorageRetrievalRequest(array<string|int, mixed> $details) : mixed
Attempts to place a call slip 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)
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
setCacheStorage()
Set a cache storage object.
public
setCacheStorage([StorageInterface $cache = null ]) : void
Parameters
- $cache : StorageInterface = null
-
Cache storage interface
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 —setSorter()
Set the sorter
public
setSorter(SorterInterface $sorter) : void
Parameters
- $sorter : SorterInterface
-
Sorter service
Return values
void —setTranslator()
Set a translator
public
setTranslator(TranslatorInterface $translator) : TranslatorAwareInterface
Parameters
- $translator : TranslatorInterface
-
Translator
Return values
TranslatorAwareInterface —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
Tags
Return values
bool —True if the method can be called with the given parameters, false otherwise.
translate()
Translate a string (or string-castable object)
public
translate(string|object|array<string|int, mixed> $target[, array<string|int, mixed> $tokens = [] ][, string $default = null ][, bool $useIcuFormatter = false ][, array<string|int, string> $fallbackDomains = [] ]) : string
Parameters
- $target : string|object|array<string|int, mixed>
-
String to translate or an array of text domain and string to translate
- $tokens : array<string|int, mixed> = []
-
Tokens to inject into the translated string
- $default : string = null
-
Default value to use if no translation is found (null for no default).
- $useIcuFormatter : bool = false
-
Should we use an ICU message formatter instead of the default behavior?
- $fallbackDomains : array<string|int, string> = []
-
Text domains to check if no match is found in the domain specified in $target
Return values
string —translateWithPrefix()
Translate a string (or string-castable object) using a prefix, or without the prefix if a prefixed translation is not found.
public
translateWithPrefix(string $prefix, string|object|array<string|int, mixed> $target[, array<string|int, mixed> $tokens = [] ][, string $default = null ][, bool $useIcuFormatter = false ][, array<string|int, string> $fallbackDomains = [] ]) : string
Parameters
- $prefix : string
-
Translation key prefix
- $target : string|object|array<string|int, mixed>
-
String to translate or an array of text domain and string to translate
- $tokens : array<string|int, mixed> = []
-
Tokens to inject into the translated string
- $default : string = null
-
Default value to use if no translation is found (null for no default).
- $useIcuFormatter : bool = false
-
Should we use an ICU message formatter instead of the default behavior?
- $fallbackDomains : array<string|int, string> = []
-
Text domains to check if no match is found in the domain specified in $target
Return values
string —buildBasicXML()
Build Basic XML
protected
buildBasicXML(array<string|int, mixed> $xml) : string
Builds a simple xml string to send to the API
Parameters
- $xml : array<string|int, mixed>
-
A keyed array of xml node names and data
Return values
string —An XML string
buildSqlFromArray()
Protected support method for building sql strings.
protected
buildSqlFromArray(array<string|int, mixed> $sql) : array<string|int, mixed>
Parameters
- $sql : array<string|int, mixed>
-
An array of keyed sql data
Return values
array<string|int, mixed> —An string query string and bind data
checkAccountBlocks()
Check Account Blocks
protected
checkAccountBlocks(string $patronId) : mixed
Checks if a user has any blocks against their account which may prevent them performing certain operations
Parameters
- $patronId : string
-
A Patron ID
Return values
mixed —A boolean false if no blocks are in place and an array of block reasons if blocks are in place
checkItemRequests()
Check Item Requests
protected
checkItemRequests(string $patronId, string $request, string $bibId[, string $itemId = false ]) : bool
Determines if a user can place a hold or recall on a specific item
Parameters
- $patronId : string
-
The user's Patron ID
- $request : string
-
The request type (hold or recall)
- $bibId : string
-
An item's Bib ID
- $itemId : string = false
-
An item's Item ID (optional)
Return values
bool —true if the request can be made, false if it cannot
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 —debugSQL()
Log an SQL statement debug message.
protected
debugSQL(string $func, string $sql[, array<string|int, mixed> $params = null ]) : void
Parameters
- $func : string
-
Function name or description
- $sql : string
-
The SQL statement
- $params : array<string|int, mixed> = null
-
SQL bind parameters
Return values
void —determineAvailability()
Protected support method to take an array of status strings and determine whether or not this indicates an available item. Returns an array with two keys: 'available', the boolean availability status, and 'otherStatuses', every status code found other than "Not Charged" - for use with pickStatus().
protected
determineAvailability(array<string|int, mixed> $statusArray) : array<string|int, mixed>
Parameters
- $statusArray : array<string|int, mixed>
-
The status codes to analyze.
Return values
array<string|int, mixed> —Availability and other status information.
determineHoldType()
Determine Hold Type
protected
determineHoldType(string $patronId, string $bibId[, string $itemId = false ]) : string
Determines if a user can place a hold or recall on a particular item
Parameters
- $patronId : string
-
The user's Patron ID
- $bibId : string
-
An item's Bib ID
- $itemId : string = false
-
An item's Item ID (optional)
Return values
string —The name of the request method to use or false on failure
encodeXML()
Encode a string for XML
protected
encodeXML(string $string) : string
Parameters
- $string : string
-
String to be encoded
Return values
string —Encoded string
executeSQL()
Execute an SQL query
protected
executeSQL(string|array<string|int, mixed> $sql[, array<string|int, mixed> $bind = [] ]) : PDOStatement
Parameters
- $sql : string|array<string|int, mixed>
-
SQL statement (string or array that includes bind params)
- $bind : array<string|int, mixed> = []
-
Bind parameters (if $sql is string)
Return values
PDOStatement —extractBlockReasons()
Given the appropriate portion of the blocks API response, extract a list of block reasons that VuFind is not configured to ignore.
protected
extractBlockReasons(SimpleXMLElement $borrowBlocks) : array<string|int, mixed>
Parameters
- $borrowBlocks : SimpleXMLElement
-
borrowingBlock section of XML response
Return values
array<string|int, mixed> —extractTextDomain()
Given a translation string with or without a text domain, return an array with the raw string and the text domain separated.
protected
extractTextDomain(string|object|array<string|int, mixed> $target) : array<string|int, mixed>
Parameters
- $target : string|object|array<string|int, mixed>
-
String to translate or an array of text domain and string to translate
Return values
array<string|int, mixed> —getCachedData()
Helper function for fetching cached data.
protected
getCachedData(string $key) : mixed|null
Data is cached for up to $this->cacheLifetime.
Parameters
- $key : string
-
Cache entry key
Return values
mixed|null —Cached entry or null if not cached or expired
getCacheKey()
Add instance-specific context to a cache key suffix (to ensure that multiple drivers don't accidentally share values in the cache.
protected
getCacheKey([string $key = null ]) : string
Parameters
- $key : string = null
-
Cache key suffix
Return values
string —getCallSlips()
Get Patron Storage Retrieval Requests (Call Slips). Gets callslips via the API. Returns only remote slips by default since more complete data can be retrieved directly from the local database; however, the $local parameter exists to support potential local customizations.
protected
getCallSlips(array<string|int, mixed> $patron[, bool $local = false ]) : mixed
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
- $local : bool = false
-
Whether to include local callslips
Return values
mixed —Array of the patron's storage retrieval requests.
getDb()
Initialize database connection if necessary and return it.
protected
getDb() : PDO
Tags
Return values
PDO —getDebugTranslation()
Build a debug-mode translation
protected
getDebugTranslation(string $domain, string $str, array<string|int, mixed> $tokens) : string
Parameters
- $domain : string
-
Text domain
- $str : string
-
String to translate
- $tokens : array<string|int, mixed>
-
Tokens to inject into the translated string
Return values
string —getFineSQL()
Protected support method for getMyFines.
protected
getFineSQL(array<string|int, mixed> $patron) : array<string|int, mixed>
Parameters
- $patron : array<string|int, mixed>
-
Patron data for use in an sql query
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getHoldingData()
Protected support method for getHolding.
protected
getHoldingData(array<string|int, mixed> $sqlRows) : array<string|int, mixed>
Parameters
- $sqlRows : array<string|int, mixed>
-
Sql Data
Return values
array<string|int, mixed> —Keyed data
getHoldingItemsSQL()
Protected support method for getHolding.
protected
getHoldingItemsSQL(array<string|int, mixed> $id) : array<string|int, mixed>
Parameters
- $id : array<string|int, mixed>
-
A Bibliographic id
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getHoldingNoItemsSQL()
Protected support method for getHolding.
protected
getHoldingNoItemsSQL(array<string|int, mixed> $id) : array<string|int, mixed>
Parameters
- $id : array<string|int, mixed>
-
A Bibliographic id
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getHoldsFromApi()
Get patron's local or remote holds from the API
protected
getHoldsFromApi(array<string|int, mixed> $patron, bool $local) : array<string|int, mixed>
This is responsible for retrieving all local or remote holds by a specific patron.
Parameters
- $patron : array<string|int, mixed>
-
The patron array from patronLogin
- $local : bool
-
Whether to fetch local holds instead of remote holds
Tags
Return values
array<string|int, mixed> —Array of the patron's holds on success.
getItemSortSequenceSQL()
Helper function that returns SQL for getting a sort sequence for a location
protected
getItemSortSequenceSQL(string $locationColumn) : string
Parameters
- $locationColumn : string
-
Column in the full where clause containing the column id
Return values
string —getLocationName()
Look up a location name by ID.
protected
getLocationName(int $id) : string
Parameters
- $id : int
-
Location ID to look up
Return values
string —getMFHDData()
Get specified fields from an MFHD MARC Record
protected
getMFHDData(MarcReader $record, array<string|int, mixed>|string $fieldSpecs) : string|array<string|int, mixed>
Parameters
- $record : MarcReader
-
Marc reader
- $fieldSpecs : array<string|int, mixed>|string
-
Array or colon-separated list of field/subfield specifications (3 chars for field code and then subfields, e.g. 866az)
Return values
string|array<string|int, mixed> —Results as a string if single, array if multiple
getMyHoldsSQL()
Protected support method for getMyHolds.
protected
getMyHoldsSQL(array<string|int, mixed> $patron) : array<string|int, mixed>
Fetch both local and remote holds. Remote hold data will be augmented using the API.
Parameters
- $patron : array<string|int, mixed>
-
Patron data for use in an sql query
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getMyStorageRetrievalRequestsSQL()
Protected support method for getMyStorageRetrievalRequests.
protected
getMyStorageRetrievalRequestsSQL(array<string|int, mixed> $patron) : array<string|int, mixed>
Parameters
- $patron : array<string|int, mixed>
-
Patron data for use in an sql query
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getMyTransactionsSQL()
Protected support method for getMyTransactions.
protected
getMyTransactionsSQL(array<string|int, mixed> $patron) : array<string|int, mixed>
Parameters
- $patron : array<string|int, mixed>
-
Patron data for use in an sql query
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getPurchaseHistoryData()
Get Purchase History Data
protected
getPurchaseHistoryData(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). It is used by getHoldings() and getPurchaseHistory() depending on whether the purchase history is displayed by holdings or in a separate list.
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.
getStatusData()
Protected support method for getStatus -- process rows returned by SQL lookup.
protected
getStatusData(array<string|int, mixed> $sqlRows) : array<string|int, mixed>
Parameters
- $sqlRows : array<string|int, mixed>
-
Sql Data
Return values
array<string|int, mixed> —Keyed data
getStatusNoItemsSQL()
Protected support method for getStatus -- get components for status lookup SQL to use when a bib record has no items.
protected
getStatusNoItemsSQL(array<string|int, mixed> $id) : array<string|int, mixed>
Parameters
- $id : array<string|int, mixed>
-
A Bibliographic id
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getStatusRanking()
Support method for pickStatus() -- get the ranking value of the specified status message.
protected
getStatusRanking(string $status) : int
Parameters
- $status : string
-
Status message to look up
Return values
int —getStatusSQL()
Protected support method for getStatus -- get components required for standard status lookup SQL.
protected
getStatusSQL(array<string|int, mixed> $id) : array<string|int, mixed>
Parameters
- $id : array<string|int, mixed>
-
A Bibliographic id
Return values
array<string|int, mixed> —Keyed data for use in an sql query
getUBRequestDetails()
A helper function that retrieves UB request details for ILL and caches them for a short while for faster access.
protected
getUBRequestDetails(string $id, array<string|int, mixed> $patron) : bool|array<string|int, mixed>
Parameters
- $id : string
-
BIB id
- $patron : array<string|int, mixed>
-
Patron
Return values
bool|array<string|int, mixed> —False if UB request is not available or an array of details on success
holdError()
Hold Error
protected
holdError(string $msg) : array<string|int, mixed>
Returns a Hold Error Message
Parameters
- $msg : string
-
An error message string
Return values
array<string|int, mixed> —An array with a success (boolean) and sysMessage key
isBorrowable()
Support method for VuFind Hold Logic. Takes an item type id and determines whether or not an item is borrowable based on the non_borrowable settings in configuration file
protected
isBorrowable(string $itemTypeID) : bool
Parameters
- $itemTypeID : string
-
The item type id to analyze.
Return values
bool —Whether an item is borrowable
isHoldable()
Support method for VuFind Hold Logic. Take an array of status strings and determines whether or not an item is holdable based on the valid_hold_statuses settings in configuration file
protected
isHoldable(array<string|int, mixed> $statusArray) : bool
Parameters
- $statusArray : array<string|int, mixed>
-
The status codes to analyze.
Return values
bool —Whether an item is holdable
isILLRequestAllowed()
Support method for VuFind ILL Logic. Take a holdings row array and determine whether or not an ILL (UB) request is allowed.
protected
isILLRequestAllowed(array<string|int, mixed> $holdingsRow) : bool
Parameters
- $holdingsRow : array<string|int, mixed>
-
The holdings row to analyze.
Tags
Return values
bool —Whether an item is holdable
isLocalInst()
Support method: is this institution code a local one?
protected
isLocalInst(string $institution) : bool
Parameters
- $institution : string
-
Institution code
Return values
bool —isRecordOnLoan()
Check whether the given patron has the given bib record or its item on loan.
protected
isRecordOnLoan(int $patronId, int $bibId[, int $itemId = null ]) : bool
Parameters
- $patronId : int
-
Patron ID
- $bibId : int
-
Bib ID
- $itemId : int = null
-
Item ID (optional)
Return values
bool —isStorageRetrievalRequestAllowed()
Support method for VuFind Storage Retrieval Request (Call Slip) Logic.
protected
isStorageRetrievalRequestAllowed(array<string|int, mixed> $holdingsRow) : bool
Take a holdings row array and determine whether or not a call slip is allowed based on the valid_call_slip_locations settings in configuration file
Parameters
- $holdingsRow : array<string|int, mixed>
-
The holdings row to analyze.
Return values
bool —Whether an item is requestable
itemsAvailable()
Check whether there are items available for loan for the given BIB ID
protected
itemsAvailable(int $bibId[, int|null $requestGroupId = null ]) : bool
Parameters
- $bibId : int
-
BIB ID
- $requestGroupId : int|null = null
-
Request group ID or null
Return values
bool —itemsExist()
Check whether items exist for the given BIB ID
protected
itemsExist(int $bibId[, int|null $requestGroupId = null ]) : bool
Parameters
- $bibId : int
-
BIB ID
- $requestGroupId : int|null = null
-
Request group ID or null
Return values
bool —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 —makeItemRequests()
Make Item Requests
protected
makeItemRequests(string $patron, string $type, array<string|int, mixed> $requestData) : array<string|int, mixed>
Places a Hold or Recall for a particular title or item
Parameters
- $patron : string
-
Patron information from patronLogin
- $type : string
-
The request type (hold or recall)
- $requestData : array<string|int, mixed>
-
An array of parameters to submit with the request
Return values
array<string|int, mixed> —An array of data from the attempted request including success, status and a System Message (if available)
makeRequest()
Make Request
protected
makeRequest(array<string|int, mixed> $hierarchy[, array<string|int, mixed> $params = false ][, string $mode = 'GET' ][, string $xml = false ]) : obj
Makes a request to the Voyager Restful API
Parameters
- $hierarchy : array<string|int, mixed>
-
Array of key-value pairs to embed in the URL path of the request (set value to false to inject a non-paired value).
- $params : array<string|int, mixed> = false
-
A keyed array of query data
- $mode : string = 'GET'
-
The http request method to use (Default of GET)
- $xml : string = false
-
An optional XML string to send to the API
Tags
Return values
obj —A Simple XML Object loaded with the xml data returned by the API
pickStatus()
Protected support method to pick which status message to display when multiple options are present.
protected
pickStatus(array<string|int, mixed> $statusArray) : string
Parameters
- $statusArray : array<string|int, mixed>
-
Array of status messages to choose from.
Tags
Return values
string —The best status message to display.
pickTransactionStatus()
Pick a transaction status worth displaying to the user (or return false if nothing important is found).
protected
pickTransactionStatus(array<string|int, mixed> $statuses) : string|bool
Parameters
- $statuses : array<string|int, mixed>
-
Status strings
Return values
string|bool —pickUpLocationIsValid()
Is the selected pickup location valid for the hold?
protected
pickUpLocationIsValid(string $pickUpLocation, array<string|int, mixed> $patron, array<string|int, mixed> $holdDetails) : bool
Parameters
- $pickUpLocation : string
-
Selected pickup location
- $patron : array<string|int, mixed>
-
Patron information returned by the patronLogin method.
- $holdDetails : array<string|int, mixed>
-
Details of hold being placed
Return values
bool —processFinesData()
Protected support method for getMyFines.
protected
processFinesData(array<string|int, mixed> $sqlRow) : array<string|int, mixed>
Parameters
- $sqlRow : array<string|int, mixed>
-
An array of keyed data
Tags
Return values
array<string|int, mixed> —Keyed data for display by template files
processHoldingData()
Protected support method for getHolding.
protected
processHoldingData(array<string|int, mixed> $data, string $id[, array<string|int, mixed> $patron = null ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
Item Data
- $id : string
-
The BIB record id
- $patron : array<string|int, mixed> = null
-
Patron Data
Return values
array<string|int, mixed> —Keyed data
processHoldingDueDate()
Support method for processHoldingData: format a due date for inclusion in holdings data.
protected
processHoldingDueDate(array<string|int, mixed> $row) : string|bool
Parameters
- $row : array<string|int, mixed>
-
Row to process
Return values
string|bool —processHoldingReturnDate()
Support method for processHoldingData: format a return date for inclusion in holdings data.
protected
processHoldingReturnDate(array<string|int, mixed> $row) : string|bool
Parameters
- $row : array<string|int, mixed>
-
Row to process
Return values
string|bool —processHoldingRow()
Protected support method for getHolding.
protected
processHoldingRow(array<string|int, mixed> $sqlRow) : array<string|int, mixed>
Parameters
- $sqlRow : array<string|int, mixed>
-
SQL Row Data
Return values
array<string|int, mixed> —Keyed data
processHoldsList()
Process Holds List
protected
processHoldsList(array<string|int, mixed> $holdList) : mixed
This is responsible for processing holds to ensure only one record is shown for each hold.
Parameters
- $holdList : array<string|int, mixed>
-
The Hold List Array
Return values
mixed —Array of the patron's holds.
processMyHoldsData()
Protected support method for getMyHolds.
protected
processMyHoldsData(array<string|int, mixed> $sqlRow) : array<string|int, mixed>
Parameters
- $sqlRow : array<string|int, mixed>
-
An array of keyed data
Tags
Return values
array<string|int, mixed> —Keyed data for display by template files
processMyStorageRetrievalRequestsData()
Protected support method for getMyStorageRetrievalRequests.
protected
processMyStorageRetrievalRequestsData(array<string|int, mixed> $sqlRow) : array<string|int, mixed>
Parameters
- $sqlRow : array<string|int, mixed>
-
An array of keyed data
Return values
array<string|int, mixed> —Keyed data for display by template files
processMyTransactionsData()
Protected support method for getMyTransactions.
protected
processMyTransactionsData(array<string|int, mixed> $sqlRow[, array<string|int, mixed> $patron = false ]) : array<string|int, mixed>
Parameters
- $sqlRow : array<string|int, mixed>
-
An array of keyed data
- $patron : array<string|int, mixed> = false
-
An array of keyed patron data
Return values
array<string|int, mixed> —Keyed data for display by template files
processRecordSegment()
Protected support method for getHolding.
protected
processRecordSegment(array<string|int, mixed> $recordSegment) : array<string|int, mixed>
Parameters
- $recordSegment : array<string|int, mixed>
-
A Marc Record Segment obtained from an SQL query
Return values
array<string|int, mixed> —Keyed data
processStatusData()
Protected support method for getStatus -- process all details collected by getStatusData().
protected
processStatusData(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
SQL Row Data
Tags
Return values
array<string|int, mixed> —Keyed data
putCachedData()
Helper function for storing cached data.
protected
putCachedData(string $key, mixed $entry[, int $lifetime = null ]) : void
Data is cached for up to $this->cacheLifetime seconds.
Parameters
- $key : string
-
Cache entry key
- $entry : mixed
-
Entry to be cached
- $lifetime : int = null
-
Optional lifetime for the entry in seconds
Return values
void —removeCachedData()
Helper function for removing cached data.
protected
removeCachedData(string $key) : void
Parameters
- $key : string
-
Cache entry key
Return values
void —requestGroupSortFunction()
Sort function for sorting request groups
protected
requestGroupSortFunction(array<string|int, mixed> $a, array<string|int, mixed> $b) : number
Parameters
- $a : array<string|int, mixed>
-
Request group
- $b : array<string|int, mixed>
-
Request group
Return values
number —sanitizePIN()
Sanitize patron PIN code (remove characters Voyager doesn't handle properly)
protected
sanitizePIN(string $pin) : string
Parameters
- $pin : string
-
PIN code to sanitize
Return values
string —Sanitized PIN code
sanitizeTranslationKey()
Make sure there are not any illegal characters in the translation key that might prevent successful lookup in language files.
protected
sanitizeTranslationKey(string $key) : string
Parameters
- $key : string
-
Key to sanitize
Return values
string —Sanitized key
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)
Tags
Return values
never —translateString()
Get translation for a string
protected
translateString(string $rawStr[, array<string|int, mixed> $tokens = [] ][, string $default = null ][, string $domain = 'default' ][, bool $useIcuFormatter = false ]) : string
Parameters
- $rawStr : string
-
String to translate
- $tokens : array<string|int, mixed> = []
-
Tokens to inject into the translated string
- $default : string = null
-
Default value to use if no translation is found (null for no default).
- $domain : string = 'default'
-
Text domain (omit for default)
- $useIcuFormatter : bool = false
-
Should we use an ICU message formatter instead of the default behavior?
Return values
string —utf8Encode()
Convert string from ISO 8859-1 into UTF-8
protected
utf8Encode(string $iso88591) : string
Parameters
- $iso88591 : string
-
String to convert