Placeholder for Locum-specific documentation
!! This documentation is incomplete !!
A list of Locum functions
THIS DOCUMENTATION IS INCOMPLETE
Function:
get_bib_item ($bnum, $get_inactive = FALSE)
Purpose:
get_bib_item() takes a bib number and returns bib-level information about that record.
Arguments:
$bnum : (string) required Item bib number
$get_bib_item : (boolean) optional Return the record, even if it's marked inactive
Returns:
Array of bib-level information
(
[bnum] => (int) Bibliographic record number
[author] => (string) Author
[addl_author] => (string - serialized) Additional Authors
[title] => (string) Title, by itself
[title_medium] => (string) Media information (ie "Sound Recording")
[edition] => (string) Edition information
[series] => (string) Series title/information
[callnum] => (string) Bib-level call number
[pub_info] => (string) Publisher information
[pub_year] => (int) Year of publication - YYYY
[stdnum] => (string) Standard number - usually ISBN
[upc] => (string) UPC symbol code
[lccn] => (string) LC number
[descr] => (string) Physical description
[notes] => (string - serialized) Notes fields
[subjects] => (string - serialized) Subject headings
[lang] => (string) Language code
[loc_code] => (string) Bib-level location code (ie branch code)
[mat_code] => (string) Material type code
[cover_img] => (string) Cover image URL (or CACHE if using covercache module)
[download_link] => (string) URL for downloadable content
[modified] => (timestamp) Last modified datetime: YYYY-MM-DD HH:MM:SS
[bib_created] => (datestamp) Bib creation date: YYYY-MM-DD
[bib_lastupdate] => (datestamp) Last update date: YYYY-MM-DD
[bib_prevupdate] => (datestamp) Second-to-last update date: YYYY-MM-DD
[bib_revs] => (int) Total number of record revisions
[active] => (int) 0 = record is inactive/suppressed, 1 = record is active
)Function:
get_item_status ($bnum, $force_refresh = FALSE)
Purpose:
get_item_status() takes a bib number and returns item availability information.
Arguments:
$bnum : (string) required Item bib number
$force_refresh : (boolean) optional Forces a refresh on the availability cache for that item.
Returns:
Array of availability information
(
[total] => (int) Total number of items in the system
[avail] => (int) Total number of items currently available
[holds] => (int) Total number of holds on the item
[on_order] => (int) Total number of copies on order
[orders] => Array of order descriptors
(
[] => (string) Description of order
)
[nextdue] => (int) UNIX timestamp for when the next item is due
[items] => Array of individual item availability
(
[] => Array
(
[location] => (string) Readable location of this item
[loc_code] => (string) Location code of this item
[callnum] => (string) Call number of this item
[statusmsg] => (string) Item status message
[due] => (int) UNIX timestamp for when this item is due
[avail] => (int) 0 = Item is not available, 1 = Item is available
[age] => (string) Age/audience level of this item
[branch] => (string) Branch code/identifier for this item
)
)
[locations] => Array of locations that have this item associated with it
(
[(string) Location code] => Array of available ages at this location
(
[(string) Age name] => (int) # of items in that age range/section
)
)
[callnums] => Array of call numbers
(
[] => (string) Call number
)
[ages] => Array of ages associated with this record
(
[(string) Age] => Array of availability for that age grouping
(
[avail] => (int) # of items currently available in that age grouping
[total] => (int) Total # of items belonging to that age grouping
)
)
[branches] => Array of branches where this item may live
(
[(string) Branch code] => Array of availability for that branch
(
[avail] => (int) # of items currently available at that branch
[total] => (int) Total # of items belonging to that branch
)
)
)Example:
Array
(
[total] => 6
[avail] => 0
[holds] => 24
[on_order] => 5
[orders] => Array
(
[0] => 2 copies being processed for New Fiction .
[1] => 3 copies being processed for New Fiction Express.
)
[nextdue] => 1264568400
[items] => Array
(
[0] => Array
(
[location] => New Fiction
[loc_code] => m1fgr
[callnum] => Fic DEE
[statusmsg] => DUE 02-17-10
[due] => 1266382800
[avail] => 0
[age] => adult
[branch] => nc
)
[1] => Array
(
[location] => New Fiction
[loc_code] => m1fgr
[callnum] => Fic DEE
[statusmsg] => DUE 02-17-10
[due] => 1266382800
[avail] => 0
[age] => adult
[branch] => nc
)
[2] => Array
(
[location] => New Fiction
[loc_code] => m1fgr
[callnum] => Fic DEE
[statusmsg] => DUE 02-09-10
[due] => 1265691600
[avail] => 0
[age] => adult
[branch] => nc
)
[3] => Array
(
[location] => New Fiction Express
[loc_code] => m1fgx
[callnum] => Fic DEE
[statusmsg] => DUE 01-28-10
[due] => 1264654800
[avail] => 0
[age] => adult
[branch] => dl
)
[4] => Array
(
[location] => New Fiction Express
[loc_code] => m1fgx
[callnum] => Fic DEE
[statusmsg] => DUE 01-27-10
[due] => 1264568400
[avail] => 0
[age] => adult
[branch] => dl
)
[5] => Array
(
[location] => New Fiction Express
[loc_code] => m1fgx
[callnum] => Fic DEE
[statusmsg] => DUE 01-28-10
[due] => 1264654800
[avail] => 0
[age] => adult
[branch] => dl
)
)
[locations] => Array
(
[m1fgr] => Array
(
[adult] => 3
)
[m1fgx] => Array
(
[adult] => 3
)
)
[callnums] => Array
(
[0] => Fic DEE
)
[ages] => Array
(
[adult] => Array
(
[avail] => 0
[total] => 6
)
)
[branches] => Array
(
[nc] => Array
(
[avail] => 0
[total] => 3
)
[dl] => Array
(
[avail] => 0
[total] => 3
)
)
)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)
)