ShortlinksServiceInterface
extends
DbServiceInterface
in
Database service interface for shortlinks.
Tags
Table of Contents
- createAndPersistEntityForPath() : ShortlinksEntityInterface
- Create and persist an entity for the provided path.
- createEntity() : ShortlinksEntityInterface
- Create a short link entity.
- 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.
Methods
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 —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.