VuFindHarvest API Documentation

Communicator
in package
Uses WriterAwareTrait

OAI-PMH Communicator (handles low-level request/response processing).

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

$baseUrl  : string
URL to harvest from
$client  : Client
HTTP client
$outputWriter  : WriterInterface
Writer helper
$responseProcessor  : ResponseProcessorInterface
Response processor
__construct()  : mixed
Constructor
request()  : mixed
Make an OAI-PMH request. Throw an exception if there is an error; return the processed response on success.
setOutputWriter()  : void
Set an object to accept console output messages.
getOaiResponse()  : string
Make an OAI-PMH request. Throw an exception if there is an error; return an XML string on success.
sendRequest()  : string
Perform a single OAI-PMH request.
write()  : void
Write a string to the console output writer (if set).
writeLine()  : void
Write a string w/newline to the console output writer (if set).

Properties

Methods

__construct()

Constructor

public __construct(string $uri, Client $client[, ResponseProcessorInterface $processor = null ]) : mixed
Parameters
$uri : string

Base URI for OAI-PMH server

$client : Client

HTTP client

$processor : ResponseProcessorInterface = null

Response processor (optional)

Return values
mixed

request()

Make an OAI-PMH request. Throw an exception if there is an error; return the processed response on success.

public request(string $verb[, array<string|int, mixed> $params = [] ]) : mixed
Parameters
$verb : string

OAI-PMH verb to execute.

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

GET parameters for ListRecords method.

Return values
mixed

getOaiResponse()

Make an OAI-PMH request. Throw an exception if there is an error; return an XML string on success.

protected getOaiResponse(string $verb, array<string|int, mixed> $params) : string
Parameters
$verb : string

OAI-PMH verb to execute.

$params : array<string|int, mixed>

GET parameters for ListRecords method.

Return values
string

sendRequest()

Perform a single OAI-PMH request.

protected sendRequest(string $verb, array<string|int, mixed> $params) : string
Parameters
$verb : string

OAI-PMH verb to execute.

$params : array<string|int, mixed>

GET parameters for ListRecords method.

Return values
string

write()

Write a string to the console output writer (if set).

protected write(string $str) : void
Parameters
$str : string

String to write.

Return values
void

writeLine()

Write a string w/newline to the console output writer (if set).

protected writeLine(string $str) : void
Parameters
$str : string

String to write.

Return values
void

Search results