HubSessionKeyService
in package
implements
HubSessionKeyServiceInterface
Class HubSessionKeyService
This class provides methods for storing and finding customer hub session keys.
Tags
Interfaces, Classes and Traits
- HubSessionKeyServiceInterface
- Interface HubSessionKeyServiceInterface
Table of Contents
- $hubSessionKeyStorage : HubSessionKeyStorageInterface
- __construct() : mixed
- HubSessionKeyService constructor.
- findByAuthHash() : HubSessionKey|null
- To find the HubSessionKey with the AuthHash, the method delegates to the HubSessionKeyRepository.
- store() : HubSessionKeyServiceInterface
- To store the HubSessionKey and the AuthHash, the method delegates to the HubSessionKeyRepository
Properties
$hubSessionKeyStorage
protected
HubSessionKeyStorageInterface
$hubSessionKeyStorage
Methods
__construct()
HubSessionKeyService constructor.
public
__construct(HubSessionKeyStorageInterface $hubSessionKeyStorage) : mixed
Parameters
- $hubSessionKeyStorage : HubSessionKeyStorageInterface
-
Used to handle the filesystem operations.
Return values
mixed —findByAuthHash()
To find the HubSessionKey with the AuthHash, the method delegates to the HubSessionKeyRepository.
public
findByAuthHash(AuthHash $authHash) : HubSessionKey|null
Parameters
- $authHash : AuthHash
-
The hub authorization hash identifier.
Return values
HubSessionKey|null —Returns a HubSessionKey instance of null if nothing was found.
store()
To store the HubSessionKey and the AuthHash, the method delegates to the HubSessionKeyRepository
public
store(HubSessionKey $hubSessionKey, AuthHash $authHash) : HubSessionKeyServiceInterface
Parameters
- $hubSessionKey : HubSessionKey
-
The session key to be stored.
- $authHash : AuthHash
-
The authorization hash identifier.
Return values
HubSessionKeyServiceInterface —Returns same class instance for chained method calls.