VuFind API Documentation

RecordCollectionInterface extends Countable, Iterator
in

Interface for backend responses to a search() operation.

Tags
category

Search

author

David Maus maus@hab.de

license

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

link
https://vufind.org/wiki/development

Table of Contents

add()  : void
Add a record to the collection.
first()  : RecordInterface|null
Return first record in collection.
getErrors()  : array<string|int, mixed>
Return any errors.
getFacets()  : array<string|int, mixed>
Return available facets.
getOffset()  : int
Return offset in the total search result set.
getRecords()  : array<string|int, mixed>
Return records.
getSourceIdentifier()  : string
Return the source backend identifier.
getTotal()  : int
Return total number of records found.
setSourceIdentifier()  : void
Set the source backend identifier.
setSourceIdentifiers()  : void
Set the source backend identifiers.

Methods

getErrors()

Return any errors.

public getErrors() : array<string|int, mixed>

Each error can be a translatable string or an array that the Flashmessages view helper understands.

Return values
array<string|int, mixed>

getFacets()

Return available facets.

public getFacets() : array<string|int, mixed>

Returns an associative array with the field name as key. The value is an associative array of available facets for the field, indexed by facet value.

Return values
array<string|int, mixed>

getRecords()

Return records.

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

getSourceIdentifier()

Return the source backend identifier.

public getSourceIdentifier() : string
Return values
string

setSourceIdentifier()

Set the source backend identifier.

public setSourceIdentifier(string $identifier) : void
Parameters
$identifier : string

Backend identifier

Tags
deprecated

Use setSourceIdentifiers instead

Return values
void

setSourceIdentifiers()

Set the source backend identifiers.

public setSourceIdentifiers(string $identifier[, string $searchBackendId = '' ]) : void
Parameters
$identifier : string

Record source identifier

$searchBackendId : string = ''

Search backend identifier (if different from $recordSourceId)

Return values
void

Search results