You are here

public function VclHandler::validateVersion in Fastly 8.3

Validates last cloned version.

Return value

bool TRUE if no validation errors, FALSE otherwise.

2 calls to VclHandler::validateVersion()
VclHandler::execute in src/VclHandler.php
Main execute function.
VclHandler::uploadMaintenancePage in src/VclHandler.php
Upload maintenance page.

File

src/VclHandler.php, line 994

Class

VclHandler
Class to control the VCL handling.

Namespace

Drupal\fastly

Code

public function validateVersion() {
  $url = $this->versionBaseUrl . '/' . $this->lastClonedVersion . '/validate';
  $response = $this
    ->vclGetWrapper($url, $this->headersGet);
  $responseData = json_decode($response
    ->getBody());
  if (!empty($responseData->errors)) {
    return FALSE;
  }
  return TRUE;
}