You are here

public function ContextApi::uploadContext in TMGMT Translator Smartling 8.3

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

Upload a new context.

Parameters

\Smartling\Context\Params\UploadContextParameters $params:

Return value

array

Throws

\Smartling\Exceptions\SmartlingApiException

File

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

Class

ContextApi
Class ContextApi

Namespace

Smartling\Context

Code

public function uploadContext(UploadContextParameters $params) {
  $requestData = $this
    ->getDefaultRequestData('multipart', $params
    ->exportToArray());
  return $this
    ->sendRequest('contexts', $requestData, self::HTTP_METHOD_POST);
}