public function ClientFactory::registerClient in Acquia Content Hub 8.2
Wrapper for register method.
Parameters
string $name: The client name.
string $url: The content hub api hostname.
string $api_key: The api key.
string $secret: The secret key.
string $api_version: The api version, default v1.
Return value
\Acquia\ContentHubClient\ContentHubClient Return Content Hub client.
Throws
\Exception
See also
\Acquia\ContentHubClient\ContentHubClient::register()
1 method overrides ClientFactory::registerClient()
- ClientFactoryMock::registerClient in tests/
modules/ acquia_contenthub_server_test/ src/ Client/ ClientFactoryMock.php - Override original, and replace Conent Hub client with mock.
File
- src/
Client/ ClientFactory.php, line 328
Class
- ClientFactory
- Instantiates an Acquia ContentHub Client object.
Namespace
Drupal\acquia_contenthub\ClientCode
public function registerClient(string $name, string $url, string $api_key, string $secret, string $api_version = 'v2') {
return ContentHubClient::register($this->loggerFactory
->get('acquia_contenthub'), $this->dispatcher, $name, $url, $api_key, $secret, $api_version);
}