You are here

function deleteRecordDemo in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/examples/progress-tracker-example.php \deleteRecordDemo()

Parameters

\Smartling\AuthApi\AuthApiInterface $authProvider:

string $projectId:

$spaceId:

$objectId:

$recordId:

Return value

bool

1 call to deleteRecordDemo()
progress-tracker-example.php in vendor/smartling/api-sdk-php/examples/progress-tracker-example.php

File

vendor/smartling/api-sdk-php/examples/progress-tracker-example.php, line 124

Code

function deleteRecordDemo($authProvider, $projectId, $spaceId, $objectId, $recordId) {
  $response = false;
  $progressTracker = \Smartling\ProgressTracker\ProgressTrackerApi::create($authProvider, $projectId);
  $st = microtime(true);
  try {
    $response = $progressTracker
      ->deleteRecord($spaceId, $objectId, $recordId);
  } 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;
}