You are here

public function ContextApi::matchContext in TMGMT Translator Smartling 8.2

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

Match context async.

Parameters

$contextUid:

Return value

array

Throws

\Smartling\Exceptions\SmartlingApiException

2 calls to ContextApi::matchContext()
ContextApi::matchContextSync in api-sdk-php/src/Context/ContextApi.php
Match context sync.
ContextApi::matchContextSync in vendor/smartling/api-sdk-php/src/Context/ContextApi.php
Match context sync.

File

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

Class

ContextApi
Class ContextApi

Namespace

Smartling\Context

Code

public function matchContext($contextUid) {
  $endpoint = vsprintf('contexts/%s/match/async', $contextUid);
  $requestData = $this
    ->getDefaultRequestData('form_params', []);
  $requestData['headers']['Content-Type'] = 'application/json';
  return $this
    ->sendRequest($endpoint, $requestData, self::HTTP_METHOD_POST);
}