VuFind API Documentation

DoiLookup extends AbstractBase
in package

AJAX handler to look up DOI data.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Table of Contents

$multiMode  : string
Behavior to use when multiple resolvers find results for the same DOI (may be 'first' -- use first match, or 'merge' -- use all results)
$openInNewWindow  : bool
Whether to open links in a new window
$pluginManager  : PluginManager
DOI Linker Plugin Manager
$proxyIcons  : bool
Whether to load icons via the cover proxy
$resolvers  : array<string|int, string>
DOI resolver configuration value, exploded into an array of options
$sessionSettings  : Settings
Session settings
$viewRenderer  : RendererInterface
View renderer
__construct()  : mixed
Constructor
handleRequest()  : array<string|int, mixed>
Handle a request.
disableSessionWrites()  : void
Prevent session writes -- this is designed to be called prior to time- consuming AJAX operations to help reduce the odds of a timing-related bug that causes the wrong version of session data to be written to disk (see VUFIND-716 for more details).
formatResponse()  : array<string|int, mixed>
Format a response array.
processIconLinks()  : array<string|int, mixed>
Proxify external DOI icon links and render local icons

Properties

$multiMode

Behavior to use when multiple resolvers find results for the same DOI (may be 'first' -- use first match, or 'merge' -- use all results)

protected string $multiMode

$openInNewWindow

Whether to open links in a new window

protected bool $openInNewWindow = false

$proxyIcons

Whether to load icons via the cover proxy

protected bool $proxyIcons = false

$resolvers

DOI resolver configuration value, exploded into an array of options

protected array<string|int, string> $resolvers

$viewRenderer

View renderer

protected RendererInterface $viewRenderer = null

Methods

__construct()

Constructor

public __construct(PluginManager $pluginManager, RendererInterface $viewRenderer, array<string|int, mixed> $config) : mixed
Parameters
$pluginManager : PluginManager

DOI Linker Plugin Manager

$viewRenderer : RendererInterface

View renderer

$config : array<string|int, mixed>

Main configuration

Return values
mixed

handleRequest()

Handle a request.

public handleRequest(Params $params) : array<string|int, mixed>
Parameters
$params : Params

Parameter helper from controller

Return values
array<string|int, mixed>

[response data, HTTP status code]

disableSessionWrites()

Prevent session writes -- this is designed to be called prior to time- consuming AJAX operations to help reduce the odds of a timing-related bug that causes the wrong version of session data to be written to disk (see VUFIND-716 for more details).

protected disableSessionWrites() : void
Return values
void

formatResponse()

Format a response array.

protected formatResponse(mixed $response[, int $httpCode = null ]) : array<string|int, mixed>
Parameters
$response : mixed

Response data

$httpCode : int = null

HTTP status code (omit for default)

Return values
array<string|int, mixed>

Proxify external DOI icon links and render local icons

protected processIconLinks(array<string|int, mixed> $dois) : array<string|int, mixed>
Parameters
$dois : array<string|int, mixed>

DOIs

Return values
array<string|int, mixed>

Search results