public function ContextApi::getAllMissingResources in TMGMT Translator Smartling 8.2
Same name in this branch
- 8.2 api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::getAllMissingResources()
- 8.2 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::getAllMissingResources()
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::getAllMissingResources()
- 8.3 vendor/smartling/api-sdk-php/src/Context/ContextApi.php \Smartling\Context\ContextApi::getAllMissingResources()
Get all missing resources.
Return value
array Contains next keys:
- "items": array of missing resources
- "all": boolean which indicates whether function has read all the available items or not.
Throws
File
- vendor/
smartling/ api-sdk-php/ src/ Context/ ContextApi.php, line 215
Class
- ContextApi
- Class ContextApi
Namespace
Smartling\ContextCode
public function getAllMissingResources() {
$missingResources = [];
$offset = FALSE;
$all = TRUE;
$start_time = time();
while (!is_null($offset)) {
$delta = time() - $start_time;
if ($delta > $this
->getTimeOut()) {
$all = FALSE;
break;
}
if (!$offset) {
$params = NULL;
}
else {
$params = new MissingResourcesParameters();
$params
->setOffset($offset);
}
$response = $this
->getMissingResources($params);
$offset = !empty($response['offset']) ? $response['offset'] : NULL;
$missingResources = array_merge($missingResources, $response['items']);
}
return [
'items' => $missingResources,
'all' => $all,
];
}