You are here

private function LingotekApi::__construct in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::__construct()
  2. 7.3 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::__construct()
  3. 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::__construct()
  4. 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::__construct()
  5. 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::__construct()

Private constructor.

File

lib/Drupal/lingotek/LingotekApi.php, line 1058
Defines Drupal\lingotek\LingotekApi

Class

LingotekApi
@file Defines Drupal\lingotek\LingotekApi

Code

private function __construct() {
  $this->debug = variable_get('lingotek_api_debug', FALSE);
  $host = variable_get('lingotek_url', LINGOTEK_API_SERVER);

  // Trim trailing slash from user-entered server name, if it exists.
  if (substr($host, -1) == '/') {
    $host = substr($host, 0, -1);
  }
  $this->api_url = $host . self::API_ENDPOINT_V4;
}