OaiResumptionService
extends AbstractDbService
in package
implements
DbTableAwareInterface, LoggerAwareInterface, OaiResumptionServiceInterface
Uses
DbTableAwareTrait, LoggerAwareTrait
Database service for OaiResumption.
Tags
Interfaces, Classes, Traits and Enums
- DbTableAwareInterface
- Marker interface for classes that depend on the \VuFind\Db\Table\PluginManager
- LoggerAwareInterface
- OaiResumptionServiceInterface
- Database service interface for OaiResumption.
Table of Contents
- $tableManager : PluginManager
- Database table plugin manager
- createAndPersistToken() : OaiResumptionEntityInterface
- Create and persist a new resumption token.
- createEntity() : OaiResumptionEntityInterface
- Create a OaiResumption entity object.
- findToken() : OaiResumptionEntityInterface|null
- Retrieve a row from the database based on primary key; return null if it is not found.
- getDbTable() : Gateway
- Get a database table object.
- getDbTableManager() : PluginManager
- Get the table plugin manager. Throw an exception if it is missing.
- persistEntity() : void
- Persist an entity.
- removeExpired() : void
- Remove all expired tokens from the database.
- setDbTableManager() : void
- Set the table plugin manager.
- debug() : void
- Log a debug message.
- encodeParams() : string
- Encode an array of parameters into the object.
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
Properties
$tableManager
Database table plugin manager
protected
PluginManager
$tableManager
Methods
createAndPersistToken()
Create and persist a new resumption token.
public
createAndPersistToken(array<string|int, mixed> $params, int $expire) : OaiResumptionEntityInterface
Parameters
- $params : array<string|int, mixed>
-
Parameters associated with the token.
- $expire : int
-
Expiration time for token (Unix timestamp).
Tags
Return values
OaiResumptionEntityInterface —createEntity()
Create a OaiResumption entity object.
public
createEntity() : OaiResumptionEntityInterface
Return values
OaiResumptionEntityInterface —findToken()
Retrieve a row from the database based on primary key; return null if it is not found.
public
findToken(string $token) : OaiResumptionEntityInterface|null
Parameters
- $token : string
-
The resumption token to retrieve.
Return values
OaiResumptionEntityInterface|null —getDbTable()
Get a database table object.
public
getDbTable(string $table) : Gateway
Parameters
- $table : string
-
Table to load.
Return values
Gateway —getDbTableManager()
Get the table plugin manager. Throw an exception if it is missing.
public
getDbTableManager() : PluginManager
Tags
Return values
PluginManager —persistEntity()
Persist an entity.
public
persistEntity(EntityInterface $entity) : void
Parameters
- $entity : EntityInterface
-
Entity to persist.
Return values
void —removeExpired()
Remove all expired tokens from the database.
public
removeExpired() : void
Return values
void —setDbTableManager()
Set the table plugin manager.
public
setDbTableManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager
Return values
void —debug()
Log a debug message.
protected
debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —encodeParams()
Encode an array of parameters into the object.
protected
encodeParams(array<string|int, mixed> $params) : string
Parameters
- $params : array<string|int, mixed>
-
Parameters to save.
Return values
string —log()
Send a message to the logger.
protected
log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
- $level : string
-
Log level
- $message : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = false
-
Prepend class name to message?
Return values
void —logError()
Log an error message.
protected
logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —logWarning()
Log a warning message.
protected
logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?