function projectDetailsDemo in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.2 api-sdk-php/examples/project-example.php \projectDetailsDemo()
- 8.2 vendor/smartling/api-sdk-php/examples/project-example.php \projectDetailsDemo()
- 8.3 vendor/smartling/api-sdk-php/examples/project-example.php \projectDetailsDemo()
Parameters
\Smartling\AuthApi\AuthApiInterface $authProvider:
string $projectId:
Return value
bool
1 call to projectDetailsDemo()
- project-example.php in vendor/
smartling/ api-sdk-php/ examples/ project-example.php
File
- vendor/
smartling/ api-sdk-php/ examples/ project-example.php, line 52
Code
function projectDetailsDemo($authProvider, $projectId) {
$response = false;
$project = \Smartling\Project\ProjectApi::create($authProvider, $projectId);
$st = microtime(true);
try {
$response = $project
->getProjectDetails();
} 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",
]);
if (!empty($response)) {
var_dump($response);
}
return $response;
}