You are here

private function Mailchimp::getDataCenter in Mailchimp 8

Gets the ID of the data center associated with an API key.

Parameters

string $api_key: The Mailchimp API key.

Return value

string The data center ID.

1 call to Mailchimp::getDataCenter()
Mailchimp::__construct in lib/mailchimp-api-php/src/Mailchimp.php
Mailchimp constructor.

File

lib/mailchimp-api-php/src/Mailchimp.php, line 301

Class

Mailchimp
Mailchimp library.

Namespace

Mailchimp

Code

private function getDataCenter($api_key) {
  $api_key_parts = explode('-', $api_key);
  return isset($api_key_parts[1]) ? $api_key_parts[1] : Mailchimp::DEFAULT_DATA_CENTER;
}