You are here

public function ContextApi::matchContext 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::matchContext()
  2. 8.2 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::matchContext()
  3. 8.3 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::matchContext()

Match context async.

Parameters

$contextUid:

\Smartling\Context\Params\MatchContextParameters $params:

Return value

array

Throws

\Smartling\Exceptions\SmartlingApiException

1 call to ContextApi::matchContext()
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 141

Class

ContextApi
Class ContextApi

Namespace

Smartling\Context

Code

public function matchContext($contextUid, MatchContextParameters $params = null) {
  $endpoint = vsprintf('contexts/%s/match/async', $contextUid);
  $requestData = $this
    ->getDefaultRequestData('json', is_null($params) ? [] : $params
    ->exportToArray());
  return $this
    ->sendRequest($endpoint, $requestData, self::HTTP_METHOD_POST);
}