ShortlinksService
extends AbstractDbService
in package
implements
DbTableAwareInterface, ShortlinksServiceInterface, TransactionInterface
Uses
DbTableAwareTrait
Database service for shortlinks.
Tags
Interfaces, Classes, Traits and Enums
- DbTableAwareInterface
- Marker interface for classes that depend on the \VuFind\Db\Table\PluginManager
- ShortlinksServiceInterface
- Database service interface for shortlinks.
- TransactionInterface
- Interface for exposing the database transaction functionality.
Table of Contents
- $tableManager : PluginManager
- Database table plugin manager
- beginTransaction() : void
- Begin a database transaction.
- commitTransaction() : void
- Commit a database transaction.
- createAndPersistEntityForPath() : ShortlinksEntityInterface
- Create and persist an entity for the provided path.
- createEntity() : ShortlinksEntityInterface
- Create a short link entity.
- getDbTable() : Gateway
- Get a database table object.
- getDbTableManager() : PluginManager
- Get the table plugin manager. Throw an exception if it is missing.
- getShortLinkByHash() : ShortlinksEntityInterface|null
- Look up a short link by hash value.
- getShortLinksWithMissingHashes() : array<string|int, ShortlinksEntityInterface>
- Get rows with missing hashes (for legacy upgrading).
- persistEntity() : void
- Persist an entity.
- rollBackTransaction() : void
- Roll back a database transaction.
- setDbTableManager() : void
- Set the table plugin manager.
Properties
$tableManager
Database table plugin manager
protected
PluginManager
$tableManager
Methods
beginTransaction()
Begin a database transaction.
public
beginTransaction() : void
Tags
Return values
void —commitTransaction()
Commit a database transaction.
public
commitTransaction() : void
Tags
Return values
void —createAndPersistEntityForPath()
Create and persist an entity for the provided path.
public
createAndPersistEntityForPath(string $path) : ShortlinksEntityInterface
Parameters
- $path : string
-
Path part of URL being shortened.
Return values
ShortlinksEntityInterface —createEntity()
Create a short link entity.
public
createEntity() : ShortlinksEntityInterface
Return values
ShortlinksEntityInterface —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 —getShortLinkByHash()
Look up a short link by hash value.
public
getShortLinkByHash(string $hash) : ShortlinksEntityInterface|null
Parameters
- $hash : string
-
Hash value.
Return values
ShortlinksEntityInterface|null —getShortLinksWithMissingHashes()
Get rows with missing hashes (for legacy upgrading).
public
getShortLinksWithMissingHashes() : array<string|int, ShortlinksEntityInterface>
Return values
array<string|int, ShortlinksEntityInterface> —persistEntity()
Persist an entity.
public
persistEntity(EntityInterface $entity) : void
Parameters
- $entity : EntityInterface
-
Entity to persist.
Return values
void —rollBackTransaction()
Roll back a database transaction.
public
rollBackTransaction() : void
Tags
Return values
void —setDbTableManager()
Set the table plugin manager.
public
setDbTableManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager