VuFind API Documentation

Connector
in package
implements LoggerAwareInterface Uses LoggerAwareTrait

Central class for connecting to EIT resources used by VuFind.

Tags
category

VuFind

author

Julia Bauder bauderj@grinnell.edu

license

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

link

Wiki

Interfaces, Classes, Traits and Enums

LoggerAwareInterface

Table of Contents

$base  : string
Base url for searches
$client  : Client
The HTTP_Request object used for REST transactions
$dbs  : array<string|int, mixed>
Array of 3-character EBSCO database abbreviations to include in search
$prof  : string
EBSCO EIT Profile used for authentication
$pwd  : string
Password associated with the EBSCO EIT Profile
__construct()  : mixed
Constructor
checkForHttpError()  : void
Check for HTTP errors in a response.
getRecord()  : array<string|int, mixed>
Retrieve a specific record.
search()  : array<string|int, mixed>
Execute a search.
call()  : SimpleXMLElement
Make an API call
debug()  : void
Log a debug message.
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.

Properties

$base

Base url for searches

protected string $base

$client

The HTTP_Request object used for REST transactions

protected Client $client

$dbs

Array of 3-character EBSCO database abbreviations to include in search

protected array<string|int, mixed> $dbs = []

$prof

EBSCO EIT Profile used for authentication

protected string $prof

$pwd

Password associated with the EBSCO EIT Profile

protected string $pwd

Methods

__construct()

Constructor

public __construct(string $base, Client $client, string $prof, string $pwd, string $dbs) : mixed
Parameters
$base : string

Base URL

$client : Client

HTTP client

$prof : string

Profile

$pwd : string

Password

$dbs : string

Database list (comma-separated abbrevs.)

Return values
mixed

checkForHttpError()

Check for HTTP errors in a response.

public checkForHttpError(Response $result) : void
Parameters
$result : Response

The response to check.

Tags
throws
BackendException
Return values
void

getRecord()

Retrieve a specific record.

public getRecord(string $id[, ParamBag $params = null ]) : array<string|int, mixed>
Parameters
$id : string

Record ID to retrieve

$params : ParamBag = null

Parameters

Tags
throws
Exception
Return values
array<string|int, mixed>

Execute a search.

public search(ParamBag $params, int $offset, int $limit) : array<string|int, mixed>
Parameters
$params : ParamBag

Parameters

$offset : int

Search offset

$limit : int

Search limit

Return values
array<string|int, mixed>

call()

Make an API call

protected call([string $method = 'GET' ][, array<string|int, mixed> $params = null ]) : SimpleXMLElement
Parameters
$method : string = 'GET'

GET or POST

$params : array<string|int, mixed> = null

Parameters to send

Return values
SimpleXMLElement

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

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