function authorizeJobDemo in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/examples/jobs-example.php \authorizeJobDemo()
Parameters
\Smartling\AuthApi\AuthApiInterface $authProvider:
string $projectId:
string $jobId:
Return value
bool
1 call to authorizeJobDemo()
- jobs-example.php in vendor/
smartling/ api-sdk-php/ examples/ jobs-example.php
File
- vendor/
smartling/ api-sdk-php/ examples/ jobs-example.php, line 287
Code
function authorizeJobDemo($authProvider, $projectId, $jobId) {
echo "--- Authorize job ---\n";
$jobs = \Smartling\Jobs\JobsApi::create($authProvider, $projectId);
$st = microtime(true);
try {
$jobs
->authorizeJob($jobId);
} catch (\Smartling\Exceptions\SmartlingApiException $e) {
var_dump($e
->getErrors());
}
$et = microtime(true);
$time = $et - $st;
echo vsprintf('Request took %s seconds.%s', [
round($time, 3),
"\n\r",
]);
}