You are here

class UpdateJobParameters in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 vendor/smartling/api-sdk-php/src/Jobs/Params/UpdateJobParameters.php \Smartling\Jobs\Params\UpdateJobParameters

Class UpdateJobParameters @package Jobs\Params

Hierarchy

Expanded class hierarchy of UpdateJobParameters

4 files declare their use of UpdateJobParameters
JobsApi.php in vendor/smartling/api-sdk-php/src/Jobs/JobsApi.php
JobsApiFunctionalTest.php in vendor/smartling/api-sdk-php/tests/functional/JobsApiFunctionalTest.php
JobsApiTest.php in vendor/smartling/api-sdk-php/tests/unit/JobsApiTest.php
SmartlingApiWrapper.php in src/Smartling/SmartlingApiWrapper.php
SmartlingApiWrapper.php.

File

vendor/smartling/api-sdk-php/src/Jobs/Params/UpdateJobParameters.php, line 11

Namespace

Smartling\Jobs\Params
View source
class UpdateJobParameters extends BaseParameters {
  public function setName($jobName) {
    if (mb_strlen($jobName, 'UTF-8') >= 170) {
      throw new \InvalidArgumentException('Job name should be less than 170 characters.');
    }
    $this
      ->set('jobName', $jobName);
  }
  public function setDescription($description) {
    if (mb_strlen($description, 'UTF-8') >= 2000) {
      throw new \InvalidArgumentException('Job description should be less than 2000 characters.');
    }
    $this
      ->set('description', $description);
  }
  public function setDueDate(\DateTime $dueDate) {
    if ($dueDate
      ->getTimestamp() < time()) {
      throw new \InvalidArgumentException('Job Due Date cannot be in the past.');
    }
    $this
      ->set('dueDate', $dueDate
      ->format('Y-m-d\\TH:i:s\\Z'));
  }

}

Members