Communicator

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

category

VuFind

package

Harvest_Tools

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Methods

Constructor

__construct(string $uri, \Laminas\Http\Client $client, \VuFindHarvest\ResponseProcessor\ResponseProcessorInterface $processor = null) 

Arguments

$uri

string

Base URI for OAI-PMH server

$client

\Laminas\Http\Client

HTTP client

$processor

\VuFindHarvest\ResponseProcessor\ResponseProcessorInterface

Response processor (optional)

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

getOaiResponse(string $verb, array $params) : string

Arguments

$verb

string

OAI-PMH verb to execute.

$params

array

GET parameters for ListRecords method.

Response

string

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

request(string $verb, array $params = array()) : mixed

Arguments

$verb

string

OAI-PMH verb to execute.

$params

array

GET parameters for ListRecords method.

Response

mixed

Perform a single OAI-PMH request.

sendRequest(string $verb, array $params) : string

Arguments

$verb

string

OAI-PMH verb to execute.

$params

array

GET parameters for ListRecords method.

Response

string

Set an object to accept console output messages.

setOutputWriter(\VuFindHarvest\ConsoleOutput\WriterInterface $writer) : void
inherited

Arguments

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

write(string $str) : void
inherited

Arguments

$str

string

String to write.

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

writeLine(string $str) : void
inherited

Arguments

$str

string

String to write.

Properties

HTTP client

client : \Laminas\Http\Client
var

Type(s)

\Laminas\Http\Client

URL to harvest from

baseUrl : string
var

Type(s)

string

Response processor

responseProcessor : \VuFindHarvest\ResponseProcessor\ResponseProcessorInterface

Writer helper

outputWriter : \VuFindHarvest\ConsoleOutput\WriterInterface
inherited