AuthHashServiceInterface
extends
DbServiceInterface
in
Database service for auth_hash table.
Tags
Table of Contents
- TYPE_EMAIL = 'email'
- createEntity() : AuthHashEntityInterface
- Create an auth_hash entity object.
- deleteAuthHash() : void
- Delete an auth_hash entity object.
- getByHashAndType() : AuthHashEntityInterface|null
- Retrieve an object from the database based on hash and type; possibly create a new row if no existing match is found.
- getLatestBySessionId() : AuthHashEntityInterface|null
- Retrieve last object from the database based on session id.
- persistEntity() : void
- Persist an entity.
Constants
TYPE_EMAIL
public
mixed
TYPE_EMAIL
= 'email'
Methods
createEntity()
Create an auth_hash entity object.
public
createEntity() : AuthHashEntityInterface
Return values
AuthHashEntityInterface —deleteAuthHash()
Delete an auth_hash entity object.
public
deleteAuthHash(AuthHashEntityInterface|int $authHashOrId) : void
Parameters
- $authHashOrId : AuthHashEntityInterface|int
-
Object or ID value representing auth_hash to delete
Return values
void —getByHashAndType()
Retrieve an object from the database based on hash and type; possibly create a new row if no existing match is found.
public
getByHashAndType(string $hash, string $type[, bool $create = true ]) : AuthHashEntityInterface|null
Parameters
- $hash : string
-
Hash
- $type : string
-
Hash type
- $create : bool = true
-
Should we create rows that don't already exist?
Return values
AuthHashEntityInterface|null —getLatestBySessionId()
Retrieve last object from the database based on session id.
public
getLatestBySessionId(string $sessionId) : AuthHashEntityInterface|null
Parameters
- $sessionId : string
-
Session ID
Return values
AuthHashEntityInterface|null —persistEntity()
Persist an entity.
public
persistEntity(EntityInterface $entity) : void
Parameters
- $entity : EntityInterface
-
Entity to persist.