VuFindHarvest API Documentation

AbstractRecordWriterStrategy
in package
implements RecordWriterStrategyInterface

Abstract record writer strategy (shared base for standard vs. combined modes of saving records).

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

Interfaces, Classes, Traits and Enums

RecordWriterStrategyInterface
Interface for record writer strategies.

Table of Contents

$basePath  : string
Directory for storing harvested files
__construct()  : mixed
Constructor
getBasePath()  : string
Get base path for writes.
getFilename()  : string
Get the filename for a specific record ID.
saveDeletedRecords()  : void
Create a tracking file to record the deletion of a record.
saveFile()  : void
Save a record to disk.

Properties

Methods

__construct()

Constructor

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

Target directory for harvested files

Return values
mixed

getFilename()

Get the filename for a specific record ID.

protected getFilename(string $id, string $ext) : string
Parameters
$id : string

ID of record to save.

$ext : string

File extension to use.

Return values
string

Full path + filename.

saveDeletedRecords()

Create a tracking file to record the deletion of a record.

protected saveDeletedRecords(string|array<string|int, mixed> $ids) : void
Parameters
$ids : string|array<string|int, mixed>

ID(s) of deleted record(s).

Return values
void

saveFile()

Save a record to disk.

protected saveFile(string $id, string $xml) : void
Parameters
$id : string

Record ID to use for filename generation.

$xml : string

XML to save.

Return values
void

Search results