VuFind API Documentation

SearchServiceInterface extends DbServiceInterface

Database service interface for search.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

interface

Table of Contents

cleanUpInvalidUserIds()  : int
Set invalid user_id values in the table to null; return count of affected rows.
createAndPersistEntityWithChecksum()  : SearchEntityInterface
Create a search entity containing the specified checksum, persist it to the database, and return a fully populated object. Throw an exception if something goes wrong during the process.
createEntity()  : SearchEntityInterface
Create a search entity.
destroySession()  : void
Destroy unsaved searches belonging to the specified session/user.
getSavedSearchesWithMissingChecksums()  : array<string|int, SearchEntityInterface>
Get saved searches with missing checksums (used for cleaning up legacy data).
getScheduledSearches()  : array<string|int, SearchEntityInterface>
Get scheduled searches.
getSearchById()  : SearchEntityInterface|null
Get a SearchEntityInterface object by ID.
getSearchByIdAndOwner()  : SearchEntityInterface|null
Get a SearchEntityInterface object by ID and owner.
getSearches()  : array<string|int, SearchEntityInterface>
Get an array of rows for the specified user.
getSearchesByChecksumAndOwner()  : array<string|int, SearchEntityInterface>
Retrieve all searches matching the specified checksum and belonging to the user specified by session or user entity/ID.
persistEntity()  : void
Persist an entity.

Methods

cleanUpInvalidUserIds()

Set invalid user_id values in the table to null; return count of affected rows.

public cleanUpInvalidUserIds() : int
Return values
int

createAndPersistEntityWithChecksum()

Create a search entity containing the specified checksum, persist it to the database, and return a fully populated object. Throw an exception if something goes wrong during the process.

public createAndPersistEntityWithChecksum(int $checksum) : SearchEntityInterface
Parameters
$checksum : int

Checksum

Tags
throws
Exception
Return values
SearchEntityInterface

destroySession()

Destroy unsaved searches belonging to the specified session/user.

public destroySession(string $sessionId[, UserEntityInterface|int|null $userOrId = null ]) : void
Parameters
$sessionId : string

Session ID of current user.

$userOrId : UserEntityInterface|int|null = null

User entity or ID of current user (optional).

Return values
void

getSearchesByChecksumAndOwner()

Retrieve all searches matching the specified checksum and belonging to the user specified by session or user entity/ID.

public getSearchesByChecksumAndOwner(int $checksum, string $sessionId[, UserEntityInterface|int|null $userOrId = null ]) : array<string|int, SearchEntityInterface>
Parameters
$checksum : int

Checksum to match

$sessionId : string

Current session ID

$userOrId : UserEntityInterface|int|null = null

Entity or ID representing current user (optional).

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

Search results