You are here

public static function ContextApi::create in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.2 api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::create()
  2. 8.2 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::create()
  3. 8.3 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::create()

Instantiates Context API object.

Parameters

AuthApiInterface $authProvider:

string $projectId:

LoggerInterface $logger:

Return value

ContextApi

10 calls to ContextApi::create()
ContextApiFunctionalTest::setUp in vendor/smartling/api-sdk-php/tests/functional/ContextApiFunctionalTest.php
Test mixture.
getAllMissingResourcesDemo in vendor/smartling/api-sdk-php/examples/context-example.php
getMatchStatusDemo in vendor/smartling/api-sdk-php/examples/context-example.php
getMissingResources in vendor/smartling/api-sdk-php/examples/context-example.php
matchContextDemo in vendor/smartling/api-sdk-php/examples/context-example.php

... See full list

File

vendor/smartling/api-sdk-php/src/Context/ContextApi.php, line 62

Class

ContextApi
Class ContextApi

Namespace

Smartling\Context

Code

public static function create(AuthApiInterface $authProvider, $projectId, $logger = null) {
  $client = self::initializeHttpClient(self::ENDPOINT_URL);
  $instance = new self($projectId, $client, $logger, self::ENDPOINT_URL);
  $instance
    ->setAuth($authProvider);
  return $instance;
}