NewGenLib
extends AbstractBase
in package
ILS Driver for NewGenLib
Tags
Table of Contents
- $config : array<string|int, mixed>
- Driver configuration
- $db : PDO
- Database connection
- getHolding() : array<string|int, mixed>
- Get Holding
- getMyFines() : mixed
- Get Patron Fines
- getMyHolds() : array<string|int, mixed>
- Get Patron Holds
- getMyProfile() : array<string|int, mixed>
- Get Patron Profile
- getMyTransactions() : array<string|int, mixed>
- Get Patron Transactions
- getNewItems() : array<string|int, mixed>
- Get New Items
- getPurchaseHistory() : array<string|int, mixed>
- Get Purchase History
- getStatus() : mixed
- Get Status
- getStatuses() : array<string|int, mixed>
- Get Statuses
- init() : void
- Initialize the driver.
- patronLogin() : mixed
- Patron Login
- setConfig() : void
- Set configuration.
- getItemStatus() : array<string|int, mixed>
- Support method to get information about the items attached to a record
- throwAsIlsException() : never
- Rethrow the provided exception as an ILS exception.
Properties
$config
Driver configuration
protected
array<string|int, mixed>
$config
= []
$db
Database connection
protected
PDO
$db
Methods
getHolding()
Get Holding
public
getHolding(string $RecordID[, 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
- $RecordID : 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.
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.
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.
getMyTransactions()
Get Patron Transactions
public
getMyTransactions(array<string|int, mixed> $patron) : array<string|int, 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
array<string|int, 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
getPurchaseHistory()
Get Purchase History
public
getPurchaseHistory(string $id) : array<string|int, mixed>
This is responsible for retrieving the acquisitions history data for the specific record (usually recently received issues of a serial).
Parameters
- $id : string
-
The record id to retrieve the info for
Tags
Return values
array<string|int, mixed> —An array with the acquisitions data on success.
getStatus()
Get Status
public
getStatus(string $RecordID) : mixed
This is responsible for retrieving the status information of a certain record.
Parameters
- $RecordID : 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> $StatusResult) : array<string|int, mixed>
This is responsible for retrieving the status information for a collection of records.
Parameters
- $StatusResult : array<string|int, mixed>
-
The array of record ids to retrieve the status for
Tags
Return values
array<string|int, mixed> —An array of getStatus() return values on success.
init()
Initialize the driver.
public
init() : void
Validate configuration and perform all resource-intensive tasks needed to make the driver active.
Tags
Return values
void —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 username
- $password : string
-
The patron's password
Tags
Return values
mixed —Associative array of patron info on successful login, null on unsuccessful login.
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 —getItemStatus()
Support method to get information about the items attached to a record
protected
getItemStatus(string $RecordID) : array<string|int, mixed>
Parameters
- $RecordID : string
-
Record ID
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)