HubClientKeysApiClient
in package
implements
HubClientKeysApiClientInterface
Class HubClientKeysApiClient
Tags
Interfaces, Classes and Traits
- HubClientKeysApiClientInterface
- Interface HubClientKeysApiClientInterface
Table of Contents
- $curlRequest : CurlRequest
- $hubClientKeyConfiguration : HubClientKeyConfigurationInterface
- $hubSettings : HubSettings
- $logControl : LogControl
- $shopKeyConfiguration : HubShopKeyConfigurationInterface
- $url : string
- __construct() : mixed
- HubClientKeysApiClient constructor.
- createClientKey() : HubClientKey
- Creates a client key in the Gambio Hub.
Properties
$curlRequest
protected
CurlRequest
$curlRequest
$hubClientKeyConfiguration
protected
HubClientKeyConfigurationInterface
$hubClientKeyConfiguration
$hubSettings
protected
HubSettings
$hubSettings
$logControl
protected
LogControl
$logControl
$shopKeyConfiguration
protected
HubShopKeyConfigurationInterface
$shopKeyConfiguration
$url
protected
string
$url
Methods
__construct()
HubClientKeysApiClient constructor.
public
__construct(string $url, HubShopKeyConfigurationInterface $shopKeyConfiguration, HubClientKeyConfigurationInterface $hubClientKeyConfiguration, CurlRequest $curlRequest, LogControl $logControl, HubSettings $hubSettings) : mixed
Parameters
- $url : string
-
Gambio Hub API URL
- $shopKeyConfiguration : HubShopKeyConfigurationInterface
-
Retrieves the shop key from shop
- $hubClientKeyConfiguration : HubClientKeyConfigurationInterface
-
Stores or retrieves the hub client key from shop configuration.
- $curlRequest : CurlRequest
-
Make cURL requests to the Hub API.
- $logControl : LogControl
-
Log communication error information.
- $hubSettings : HubSettings
-
Hub settings.
Tags
Return values
mixed —createClientKey()
Creates a client key in the Gambio Hub.
public
createClientKey(AuthHash $authHash, string $shopUrl, string $shopVersion) : HubClientKey
Provide an authorization hash that can be later used in the hub callbacks to determine where each session key belongs to. This method will additionally save the AuthHash value to the PHP session with the key 'gambio_hub_auth_hash' for later reference.
Parameters
- $authHash : AuthHash
-
The authorization hash to be used.
- $shopUrl : string
-
Shop URL (with trailing slash).
- $shopVersion : string
-
Current shop version (without leading "v").
Tags
Return values
HubClientKey —Returns the new client key.