Locum Server functions
THIS DOCUMENTATION IS INCOMPLETE
Function:
harvest_bibs ($start, $end, $quiet = TRUE)
Purpose:
harvest_bibs() takes a bib number range (from $start to $end) and harvests the bibliographic information for each record that exists within that range. This function is usually called in order to initially populate your external locum database.
Arguments:
$start : (string) required The patron's library card number.
$end : (string) required The patron's PIN number or password.
$quiet : (boolean) optional FALSE = Print log messages to stdout, TRUE = run quietly
Returns:
NULL
harvest_bibs() will populate the locum_bib_items table with bibliographic data. If pcntl is enabled and set to active in locum.ini, harvest_bibs() will take advantage of child processes to speed-up harvest times.
Function:
import_bibs ($start, $end)
Purpose:
import_bibs() takes a bib number range (from $start to $end) and harvests the bibliographic information for each record that exists within that range. This function is usually called by the child processes of harvest_bibs() in order to initially populate your external locum database. It does not coordinate with pcntl. In general, you would not call this function explicitly, though it can be.
Arguments:
$start : (string) required The patron's library card number.
$end : (string) required The patron's PIN number or password.
Returns:
Array of information about import run
(
[skipped] => (int) # of items skipped in the sequence
[imported] => (int) # of items imported in the sequence
)Function:
update_bib ($bib_arr)
Purpose:
update_bib() takes an array of bib numbers and brings the locum_bib_items table in sync with reality. If the last update date doesn't match to the locum_bib_items record, it will be downloaded and re-imported with the new information. This process also checks for weeded records and will retire any records no longer in the system.
Arguments:
$bib_arr : (array) required Array of bib numbers and latest modification dates from locum_bib_items.
Array
(
[{bib number}] => (date) date of last update (from bib_lastupdate in locum_bib_items)
)Returns:
Array of information about import run
(
[retired] => (int) # of items weeded (marked as inactive)
[updated] => (int) # of items updated
[skipped] => (int) # of items skipped (happens if ILS server is down or if there is any other general failure)
)