You are here

public function BaseApiAbstract::__construct in TMGMT Translator Smartling 8.2

Same name in this branch
  1. 8.2 api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::__construct()
  2. 8.2 vendor/smartling/api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::__construct()
Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::__construct()
  2. 8.3 vendor/smartling/api-sdk-php/src/BaseApiAbstract.php \Smartling\BaseApiAbstract::__construct()

BaseApiAbstract constructor.

Parameters

string $projectId:

ClientInterface $client:

LoggerInterface $logger:

string|null $service_url:

File

api-sdk-php/src/BaseApiAbstract.php, line 198

Class

BaseApiAbstract
Class BaseApiAbstract

Namespace

Smartling

Code

public function __construct($projectId, ClientInterface $client, $logger = null, $service_url = null) {
  $this
    ->setProjectId($projectId);
  $this
    ->setHttpClient($client);
  if (is_null($logger)) {
    $logger = new DevNullLogger();
  }
  $this
    ->setLogger($logger);
  $this
    ->setBaseUrl(rtrim($service_url, '/') . '/' . $projectId);
}