You are here

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

Same name in this branch
  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()
Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::create()
  2. 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

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

... See full list

File

api-sdk-php/src/Context/ContextApi.php, line 61

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;
}