VuFind API Documentation

RecordCollectionFactory extends AbstractJsonRecordCollectionFactory
in package

Simple factory for record collection.

Tags
category

VuFind

author

David Maus maus@hab.de

license

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

link
https://vufind.org

Table of Contents

$collectionClass  : string
Class of collection.
$recordFactory  : callable
Factory to turn data into a record object.
__construct()  : void
Constructor.
factory()  : RecordCollection
Return record collection.
getDefaultRecordCollectionClass()  : string
Get the class name of the record collection to use by default.
getDocumentListFromResponse()  : array<string|int, mixed>
Given a backend response, return an array of documents.

Properties

Methods

__construct()

Constructor.

public __construct([callable $recordFactory = null ][, string $collectionClass = null ]) : void
Parameters
$recordFactory : callable = null

Record factory callback (null for default)

$collectionClass : string = null

Class of collection

Return values
void

factory()

Return record collection.

public factory(array<string|int, mixed> $response) : RecordCollection
Parameters
$response : array<string|int, mixed>

Backend response

Return values
RecordCollection

getDefaultRecordCollectionClass()

Get the class name of the record collection to use by default.

protected getDefaultRecordCollectionClass() : string
Return values
string

getDocumentListFromResponse()

Given a backend response, return an array of documents.

protected getDocumentListFromResponse(array<string|int, mixed> $response) : array<string|int, mixed>
Parameters
$response : array<string|int, mixed>

Backend response

Return values
array<string|int, mixed>

Search results