You are here

protected function FileApi::processBodyOptions in TMGMT Translator Smartling 8.4

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

Parameters

mixed $requestData:

Return value

array

Overrides BaseApiAbstract::processBodyOptions

File

vendor/smartling/api-sdk-php/src/File/FileApi.php, line 46

Class

FileApi
Class FileApi

Namespace

Smartling\File

Code

protected function processBodyOptions($requestData = []) {
  $opts = parent::processBodyOptions($requestData);
  $key = 'file';
  if (!empty($opts['multipart'])) {
    foreach ($opts['multipart'] as &$data) {
      if ($data['name'] == $key) {
        $data['contents'] = $this
          ->readFile($data['contents']);
      }
    }
  }
  return $opts;
}