VuFind API Documentation

Search2RecordFormatter extends RecordFormatter
in package

Record formatter for API responses

Tags
category

VuFind

author

Josef Moravec moravec@mzk.cz

license

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

link

Wiki

Table of Contents

$helperManager  : HelperPluginManager
View helper plugin manager
$recordFields  : array<string|int, mixed>
Record field definitions
__construct()  : mixed
Constructor
format()  : array<string|int, mixed>
Format the results.
getRecordFields()  : array<string|int, mixed>
Get record field definitions.
getRecordFieldSpec()  : array<string|int, mixed>
Return record field specs for the API specification
filterArrayValues()  : void
Recursive function to filter array fields: - remove empty values - convert boolean values to 0/1 - force numerically indexed (non-associative) arrays to have numeric keys.
getDedupIds()  : array<string|int, mixed>|null
Get dedup IDs
getExtendedSubjectHeadings()  : array<string|int, mixed>|null
Get extended subject headings
getFields()  : array<string|int, mixed>
Get fields from a record as an array
getFullRecord()  : string|null
Get full record for a record as XML
getRawData()  : array<string|int, mixed>
Get raw data for a record as an array
getRecordPage()  : string
Get (relative) link to record page
getURLs()  : array<string|int, mixed>
Get URLs
resetArrayIndices()  : void
Reset numerical array indices.

Properties

$helperManager

View helper plugin manager

protected HelperPluginManager $helperManager

$recordFields

Record field definitions

protected array<string|int, mixed> $recordFields

Methods

__construct()

Constructor

public __construct(array<string|int, mixed> $recordFields, HelperPluginManager $helperManager) : mixed
Parameters
$recordFields : array<string|int, mixed>

Record field definitions

$helperManager : HelperPluginManager

View helper plugin manager

Return values
mixed

format()

Format the results.

public format(array<string|int, mixed> $results, array<string|int, mixed> $requestedFields) : array<string|int, mixed>
Parameters
$results : array<string|int, mixed>

Results to process (array of record drivers)

$requestedFields : array<string|int, mixed>

Fields to include in response

Return values
array<string|int, mixed>

getRecordFields()

Get record field definitions.

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

getRecordFieldSpec()

Return record field specs for the API specification

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

filterArrayValues()

Recursive function to filter array fields: - remove empty values - convert boolean values to 0/1 - force numerically indexed (non-associative) arrays to have numeric keys.

protected filterArrayValues(array<string|int, mixed> &$array) : void
Parameters
$array : array<string|int, mixed>

Array to check

Return values
void

getDedupIds()

Get dedup IDs

protected getDedupIds(AbstractBase $record) : array<string|int, mixed>|null
Parameters
$record : AbstractBase

Record driver

Return values
array<string|int, mixed>|null

getExtendedSubjectHeadings()

Get extended subject headings

protected getExtendedSubjectHeadings(SolrDefault $record) : array<string|int, mixed>|null
Parameters
$record : SolrDefault

Record driver

Return values
array<string|int, mixed>|null

getFields()

Get fields from a record as an array

protected getFields(AbstractBase $record, array<string|int, mixed> $fields) : array<string|int, mixed>
Parameters
$record : AbstractBase

Record driver

$fields : array<string|int, mixed>

Fields to get

Return values
array<string|int, mixed>

getFullRecord()

Get full record for a record as XML

protected getFullRecord(AbstractBase $record) : string|null
Parameters
$record : AbstractBase

Record driver

Return values
string|null

getRawData()

Get raw data for a record as an array

protected getRawData(AbstractBase $record) : array<string|int, mixed>
Parameters
$record : AbstractBase

Record driver

Return values
array<string|int, mixed>

resetArrayIndices()

Reset numerical array indices.

protected resetArrayIndices(array<string|int, mixed> &$array) : void
Parameters
$array : array<string|int, mixed>

Array

Return values
void

Search results