class UploadFileParameters in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/src/File/Params/UploadFileParameters.php \Smartling\File\Params\UploadFileParameters
- 8.2 api-sdk-php/src/File/Params/UploadFileParameters.php \Smartling\File\Params\UploadFileParameters
- 8.2 vendor/smartling/api-sdk-php/src/File/Params/UploadFileParameters.php \Smartling\File\Params\UploadFileParameters
Class UploadFileParameters
@package Smartling\File\Params
Hierarchy
- class \Smartling\Parameters\BaseParameters implements ParameterInterface
- class \Smartling\File\Params\UploadFileParameters
Expanded class hierarchy of UploadFileParameters
8 files declare their use of UploadFileParameters
- batch-example.php in vendor/
smartling/ api-sdk-php/ examples/ batch-example.php - BatchApi.php in vendor/
smartling/ api-sdk-php/ src/ Batch/ BatchApi.php - BatchApiTest.php in vendor/
smartling/ api-sdk-php/ tests/ unit/ BatchApiTest.php - FileApi.php in vendor/
smartling/ api-sdk-php/ src/ File/ FileApi.php - FileApiTest.php in vendor/
smartling/ api-sdk-php/ tests/ unit/ FileApiTest.php
File
- vendor/
smartling/ api-sdk-php/ src/ File/ Params/ UploadFileParameters.php, line 13
Namespace
Smartling\File\ParamsView source
class UploadFileParameters extends BaseParameters {
public function __construct($clientLibId = BaseApiAbstract::CLIENT_LIB_ID_SDK, $clientLibVersion = BaseApiAbstract::CLIENT_LIB_ID_VERSION) {
$this
->setAuthorized(false);
$this
->setClientLibId($clientLibId, $clientLibVersion);
}
/**
* @param string $client_lib_id
* @param string $version
*
* @return UploadFileParameters
*/
public function setClientLibId($client_lib_id, $version) {
$this
->set('smartling.client_lib_id', json_encode([
'client' => $client_lib_id,
'version' => $version,
], JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE));
return $this;
}
/**
* @param string $callback_url
*
* @return UploadFileParameters
*/
public function setCallbackUrl($callback_url) {
$this
->set('callbackUrl', $callback_url);
return $this;
}
/**
* @param int $authorized
*
* @return UploadFileParameters
*/
public function setAuthorized($authorized) {
$this
->set('authorize', $authorized);
return $this;
}
/**
* @param array $locales_to_approve
*
* @return UploadFileParameters
*/
public function setLocalesToApprove($locales_to_approve) {
if (is_string($locales_to_approve)) {
$locales_to_approve = [
$locales_to_approve,
];
}
$this
->set('localeIdsToAuthorize', $locales_to_approve);
return $this;
}
/**
* @inheritdoc
*/
public function exportToArray() {
$params = $this->params;
$params['authorize'] = array_key_exists('localeIdsToAuthorize', $params) ? false : (bool) $params['authorize'];
return $params;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseParameters:: |
protected | property | ||
BaseParameters:: |
public | function |
@inheritdoc Overrides ParameterInterface:: |
|
UploadFileParameters:: |
public | function |
@inheritdoc Overrides BaseParameters:: |
|
UploadFileParameters:: |
public | function | ||
UploadFileParameters:: |
public | function | ||
UploadFileParameters:: |
public | function | ||
UploadFileParameters:: |
public | function | ||
UploadFileParameters:: |
public | function |