Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
LibrarySearchManager Class Reference

Static Public Member Functions

static catalogsConfigured (bool $exclude_local=false)
 
static search (array $search_parameters=[], string $order_by=LibrarySearch::ORDER_BY_RELEVANCE, int $limit=100)
 

Detailed Description

This is a helper class for the library search functionality.

Member Function Documentation

static catalogsConfigured ( bool  $exclude_local = false)
static

Checks whether catalogs are configured or not.

Parameters
boolWhether to exclude local catalogs from the list of configured catalogs (true) or not (false). Defaults to false.
Returns
bool True, if at least one catalog is configured, false otherwise.
static search ( array  $search_parameters = [],
string  $order_by = LibrarySearch::ORDER_BY_RELEVANCE,
int  $limit = 100 
)
static

Starts a search in the configured library catalogs. If a local catalog is configured, its results are compared to the other catalogs results to identify matches that are available in the local catalog.

Parameters
array$search_parametersThe search parameters to be used.
See Also
The LibrarySearch class for standardised field names.
Parameters
string$order_byThe ordering of the search results.
See Also
The LibrarySearch class for allowed order names.
Parameters
int$limitThe maximum amount of results for each catalog.
Returns
LibraryDocument[][] A two-dimensional array of LibraryDocument instances where the first dimension represents a catalog and the second dimension represents the search results.
Exceptions
ExceptionIf no library catalogs are configured.

The documentation for this class was generated from the following file: