VuFind API Documentation

SourceAndIdList
in package

Record ID list (support class for Loader)

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Main Site

Table of Contents

$bySource  : array<string|int, mixed>
Record positions in the original list, indexed by source and ID.
$ids  : array<string|int, mixed>
Processed ID data.
__construct()  : mixed
Constructor
getAll()  : array<string|int, mixed>
Get the full list of IDs sent to the constructor, normalized to array format.
getIdsBySource()  : array<string|int, mixed>
Get an associative source => id list array.
getRecordPositions()  : array<string|int, int>
If the provided record driver corresponds with an ID in the list, return the associated positions in the list. Otherwise, return an empty array.

Properties

$bySource

Record positions in the original list, indexed by source and ID.

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

$ids

Processed ID data.

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

Methods

__construct()

Constructor

public __construct(array<string|int, mixed> $ids) : mixed
Parameters
$ids : array<string|int, mixed>

Array of associative arrays with id/source keys or strings in source|id format. In associative array formats, there is also an optional "extra_fields" key which can be used to pass in data formatted as if it belongs to the Solr schema; this is used to create a mock driver object if the real data source is unavailable.

Return values
mixed

getAll()

Get the full list of IDs sent to the constructor, normalized to array format.

public getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

getIdsBySource()

Get an associative source => id list array.

public getIdsBySource() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRecordPositions()

If the provided record driver corresponds with an ID in the list, return the associated positions in the list. Otherwise, return an empty array.

public getRecordPositions(AbstractBase $record) : array<string|int, int>
Parameters
$record : AbstractBase

Record

Return values
array<string|int, int>

Search results