Documentation

museumplus_search_functions.php

Table of Contents

Functions

mplus_xml_search_by_fieldpath()  : DOMDocument
Build the search XML for MuseumPlus API request body {@see http://docs.zetcom.com/ws/module/search/search_1_4.xsd}
mplus_search()  : array<string|int, mixed>
Run an ad-hoc module search using the provided expert search expression {@see http://docs.zetcom.com/ws/#Perform_an_ad-hoc_search_for_modules_items}
mplus_get_response_xml()  : DOMDocument
Get XML response body received from MuseumPlus search request {@see http://docs.zetcom.com/ws/module/module_1_4.xsd}
mplus_sync()  : void|array<string|int, mixed>
Synchronise (search & import) MuseumPlus module fields to the associated ("linked") resources.

Functions

mplus_xml_search_by_fieldpath()

Build the search XML for MuseumPlus API request body {@see http://docs.zetcom.com/ws/module/search/search_1_4.xsd}

mplus_xml_search_by_fieldpath(string $fp, array<string|int, mixed> $vals, array<string|int, mixed> $sfs) : DOMDocument
Parameters
$fp : string

Field path used to identify the "linked" modules. This is essentially either the technical ID field (ie. __id) or another virtual field (e.g ObjObjectNumberVrt)

$vals : array<string|int, mixed>

Module record IDs to search for in MuseumPlus. Hash table where key is resource ID and value is the MpID

$sfs : array<string|int, mixed>

MuseumPlus modules' fields to return back

Return values
DOMDocument

Returns XML document with the search criteria

Run an ad-hoc module search using the provided expert search expression {@see http://docs.zetcom.com/ws/#Perform_an_ad-hoc_search_for_modules_items}

mplus_search(string $module_name, DOMDocument $search) : array<string|int, mixed>
Parameters
$module_name : string

Module name

$search : DOMDocument

Expert search criteria. mplus_xml_search_by_fieldpath()

Return values
array<string|int, mixed>

mplus_get_response_xml()

Get XML response body received from MuseumPlus search request {@see http://docs.zetcom.com/ws/module/module_1_4.xsd}

mplus_get_response_xml(array<string|int, mixed> $result) : DOMDocument
Parameters
$result : array<string|int, mixed>

Search results as returned by mplus_search()

Return values
DOMDocument

mplus_sync()

Synchronise (search & import) MuseumPlus module fields to the associated ("linked") resources.

mplus_sync(array<string|int, mixed> $ramc) : void|array<string|int, mixed>
Parameters
$ramc : array<string|int, mixed>

Valid resources with an associated module configuration. mplus_validate_association()

Return values
void|array<string|int, mixed>

Returns NULL if sync finished (or had nothing to process) -or- list of errors caught during the validation/sync process (NOTE: validation errors get carried forward).

On this page

Search results