VuFind API Documentation

EuropeanaResults
in package
implements RecommendInterface, HttpServiceAwareInterface, LoggerAwareInterface Uses LoggerAwareTrait, HttpServiceAwareTrait

EuropeanaResults Recommendations Module

This class provides recommendations by using the Europeana API.

Tags
category

VuFind

author

Lutz Biedinger lutz.biedinger@gmail.com

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

RecommendInterface
Search Recommendations Interface
HttpServiceAwareInterface
LoggerAwareInterface

Table of Contents

$baseUrl  : string
Europeana base URL
$excludeProviders  : array<string|int, mixed>
Providers to exclude
$key  : string
API key
$limit  : int
Result limit
$lookfor  : string
Search string
$requestParam  : string
Request parameter for searching
$results  : array<string|int, mixed>
Search results
$searchSite  : string
Site to search
$sitePath  : string
Link for more results
$targetUrl  : string
Fully constructed API URL
__construct()  : mixed
Constructor
getResults()  : array<string|int, mixed>|bool
Get the results of the query (false if none).
init()  : void
Called before the Search Results object performs its main search (specifically, in response to \VuFind\Search\SearchRunner::EVENT_CONFIGURED).
process()  : void
Called after the Search Results object has performed its main search. This may be used to extract necessary information from the Search Results object or to perform completely unrelated processing.
setConfig()  : void
Store the configuration of the recommendation module.
debug()  : void
Log a debug message.
getURL()  : string
Build the url which will be send to retrieve the RSS results
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.

Properties

$excludeProviders

Providers to exclude

protected array<string|int, mixed> $excludeProviders

$requestParam

Request parameter for searching

protected string $requestParam

Methods

__construct()

Constructor

public __construct(string $key) : mixed
Parameters
$key : string

API key

Return values
mixed

getResults()

Get the results of the query (false if none).

public getResults() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

init()

Called before the Search Results object performs its main search (specifically, in response to \VuFind\Search\SearchRunner::EVENT_CONFIGURED).

public init(Params $params, Parameters $request) : void

This method is responsible for setting search parameters needed by the recommendation module and for reading any existing search parameters that may be needed.

Parameters
$params : Params

Search parameter object

$request : Parameters

Parameter object representing user request.

Return values
void

process()

Called after the Search Results object has performed its main search. This may be used to extract necessary information from the Search Results object or to perform completely unrelated processing.

public process(Results $results) : void
Parameters
$results : Results

Search results object

Return values
void

setConfig()

Store the configuration of the recommendation module.

public setConfig(string $settings) : void
Parameters
$settings : string

Settings from searches.ini.

Return values
void

debug()

Log a debug message.

protected debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

getURL()

Build the url which will be send to retrieve the RSS results

protected getURL(string $targetUrl, string $requestParam, array<string|int, mixed> $excludeProviders) : string
Parameters
$targetUrl : string

Base URL

$requestParam : string

Parameter name to add

$excludeProviders : array<string|int, mixed>

An array of providers to exclude when getting results.

Return values
string

The url to be sent

log()

Send a message to the logger.

protected log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
$level : string

Log level

$message : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = false

Prepend class name to message?

Return values
void

logError()

Log an error message.

protected logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

logWarning()

Log a warning message.

protected logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

Search results