You are here

public function DownloadFileParameters::setRetrievalType in TMGMT Translator Smartling 8.2

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

Parameters

string $retrievalType:

Return value

DownloadFileParameters

Throws

SmartlingApiException

File

vendor/smartling/api-sdk-php/src/File/Params/DownloadFileParameters.php, line 28

Class

DownloadFileParameters
Class DownloadFileParameters

Namespace

Smartling\File\Params

Code

public function setRetrievalType($retrievalType) {
  $validRetrivalType = in_array($retrievalType, [
    self::RETRIEVAL_TYPE_PENDING,
    self::RETRIEVAL_TYPE_PUBLISHED,
    self::RETRIEVAL_TYPE_PSEUDO,
  ], true);
  if (!$validRetrivalType) {
    throw new SmartlingApiException('Unknown retrieval type: ' . var_export($retrievalType, true));
  }
  $this
    ->set('retrievalType', $retrievalType);
  return $this;
}