|
Stud.IP
6.1
|
Public Member Functions | |
| __construct (array $configuration=[]) | |
| query (array $search_parameters=[], string $order_by=self::ORDER_BY_RELEVANCE, int $limit=200) | |
Data Fields | |
| const | TITLE = 'title' |
| const | AUTHOR = 'author' |
| const | YEAR = 'year' |
| const | NUMBER = 'number' |
| const | ISSN = 'issn' |
| const | ISBN = 'isbn' |
| const | PUBLICATION = 'publication' |
| const | SIGNATURE = 'signature' |
| const | ORDER_BY_RELEVANCE = 'relevance' |
| const | ORDER_BY_YEAR = 'year' |
Protected Member Functions | |
| translateQueryFields (array $query_fields=[]) | |
| requestData (string $base_url='', array $url_parameters=[]) | |
Protected Attributes | |
| $request_base_url = '' | |
| $request_url_parameters = [] | |
| $settings = [] | |
This class contains basic methods for querying a library catalog using standardised search parameters.
| __construct | ( | array | $configuration = [] | ) |
A basic constructor.
| array | $configuration | The configuration for the LibrarySearch implementation. It should be an associative array with the following keys:
|
|
abstract |
Starts a query to a library catalogue using the specified parameters. If standardised parameters as defined in the FIELD_ constants of this class are used as keys in the $search_parameters array, their keys may be converted to library-specific search keys.
| array | $search_parameters | The search parameters to be used. The array must be an associative array where the keys represent the fields. |
| string | $order_by | |
| int | $limit | The maximum amount of items that shall be retrieved from the catalog. |
|
protected |
A common method for the libcurl code to request data from an URL so that LibrarySearch implementations don't have to include their own libcurl code to get data.
| string | $base_url | The base URL to request data from. |
| array | $url_parameters | URL parameters for the request. The array should consist of an associative array with keys representing the parameter name and the values representing the parameter values. |
|
abstractprotected |
This method shall replace the generalised search query fields with the implementation specific query fields.
| array | $query_fields | An array with query parameters using the generalised query fields. |
|
protected |
The base URL for the HTTP request to retrieve data.
|
protected |
Additional URL parameters for the HTTP request to retrieve data.
|
protected |
Implementation-specific configuration that can define the behavior of the LibrarySearch implementation.
| const AUTHOR = 'author' |
| const ISBN = 'isbn' |
| const ISSN = 'issn' |
| const NUMBER = 'number' |
| const ORDER_BY_RELEVANCE = 'relevance' |
| const ORDER_BY_YEAR = 'year' |
| const PUBLICATION = 'publication' |
| const SIGNATURE = 'signature' |
| const TITLE = 'title' |
| const YEAR = 'year' |