You are here

public static function SearchApiAcquiaApi::get in Acquia Search for Search API 7.2

Wrapper for constructor.

Parameters

string $subscription: Subscription name.

string $api_key: API key.

string $host: Search host name.

string $uuid: Application UUID.

Return value

\SearchApiAcquiaApi API instance.

Throws

\InvalidArgumentException

File

includes/v3/SearchApiAcquiaApi.php, line 87

Class

SearchApiAcquiaApi
Class SearchApiAcquiaApi.

Code

public static function get($subscription, $api_key, $host, $uuid) {
  if (empty($subscription) || empty($api_key) || empty($host) || empty($uuid)) {
    throw new InvalidArgumentException('Please provide API credentials for Acquia Search.');
  }
  return new self($subscription, $api_key, $host, $uuid);
}