VuFind API Documentation

Record extends Gateway
in package
implements DbServiceAwareInterface Uses DbServiceAwareTrait

Table Definition for record

Tags
category

VuFind

author

Markus Beh markus.beh@ub.uni-freiburg.de

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Main Site

Interfaces, Classes, Traits and Enums

DbServiceAwareInterface
Marker interface for classes that depend on the \VuFind\Db\Service\PluginManager

Table of Contents

$dbServiceManager  : PluginManager
Database service plugin manager
$tableManager  : PluginManager
Table manager
__construct()  : mixed
Constructor
beginTransaction()  : void
Begin a database transaction.
cleanup()  : int
Clean up orphaned entries (i.e. entries that are not in favorites anymore)
commitTransaction()  : void
Commit a database transaction.
createRow()  : object
Create a new row.
findRecord()  : Record|null
Find a record by id
findRecords()  : array<string|int, mixed>
Find records by ids
getDbService()  : T
Get a database service object.
getDbServiceManager()  : PluginManager
Get the service plugin manager. Throw an exception if it is missing.
getDbTable()  : Gateway
Get access to another table.
initializeFeatures()  : void
Initialize features
rollBackTransaction()  : void
Roll back a database transaction.
setDbServiceManager()  : void
Set the service plugin manager.
updateRecord()  : Record
Update an existing entry in the record table or create a new one

Properties

Methods

__construct()

Constructor

public __construct(Adapter $adapter, PluginManager $tm, array<string|int, mixed> $cfg[, RowGateway $rowObj = null ][, string $table = 'record' ]) : mixed
Parameters
$adapter : Adapter

Database adapter

$tm : PluginManager

Table manager

$cfg : array<string|int, mixed>

Laminas configuration

$rowObj : RowGateway = null

Row prototype object (null for default)

$table : string = 'record'

Name of database table to interface with

Return values
mixed

beginTransaction()

Begin a database transaction.

public beginTransaction() : void
Tags
throws
Exception
Return values
void

cleanup()

Clean up orphaned entries (i.e. entries that are not in favorites anymore)

public cleanup() : int
Return values
int

Number of records deleted

commitTransaction()

Commit a database transaction.

public commitTransaction() : void
Tags
throws
Exception
Return values
void

createRow()

Create a new row.

public createRow() : object
Return values
object

findRecord()

Find a record by id

public findRecord(string $id, string $source) : Record|null
Parameters
$id : string

Record ID

$source : string

Record source

Tags
throws
Exception
Return values
Record|null

findRecords()

Find records by ids

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

Record IDs

$source : string

Record source

Tags
throws
Exception
Return values
array<string|int, mixed>

Array of record row objects found

getDbService()

Get a database service object.

public getDbService(class-string<\VuFind\Db\Service\T> $name) : T
Parameters
$name : class-string<\VuFind\Db\Service\T>

Name of service to retrieve

Tags
template

T

Return values
T

getDbTable()

Get access to another table.

public getDbTable(string $table) : Gateway
Parameters
$table : string

Table name

Return values
Gateway

initializeFeatures()

Initialize features

public initializeFeatures(array<string|int, mixed> $cfg) : void
Parameters
$cfg : array<string|int, mixed>

Laminas configuration

Return values
void

rollBackTransaction()

Roll back a database transaction.

public rollBackTransaction() : void
Tags
throws
Exception
Return values
void

updateRecord()

Update an existing entry in the record table or create a new one

public updateRecord(string $id, string $source, mixed $rawData) : Record
Parameters
$id : string

Record ID

$source : string

Data source

$rawData : mixed

Raw data from source (must be serializable)

Tags
deprecated

Use RecordServiceInterface::updateRecord()

Return values
Record

Updated or newly added record

Search results